tests fixes
This commit is contained in:
@@ -23,7 +23,7 @@ public sealed class HlcTimestampJsonConverter : JsonConverter<HlcTimestamp>
|
||||
{
|
||||
if (reader.TokenType == JsonTokenType.Null)
|
||||
{
|
||||
throw new JsonException("Cannot convert null value to HlcTimestamp");
|
||||
return default;
|
||||
}
|
||||
|
||||
if (reader.TokenType != JsonTokenType.String)
|
||||
|
||||
@@ -106,8 +106,9 @@ public sealed class HybridLogicalClock : IHybridLogicalClock
|
||||
_logger = logger;
|
||||
_maxClockSkew = maxClockSkew ?? TimeSpan.FromMinutes(1);
|
||||
|
||||
// Initialize to current physical time
|
||||
_lastPhysicalTime = _timeProvider.GetUtcNow().ToUnixTimeMilliseconds();
|
||||
// Initialize to 0 so first Tick() will advance physical time and reset counter
|
||||
// This follows the standard HLC algorithm where l starts at 0
|
||||
_lastPhysicalTime = 0;
|
||||
_logicalCounter = 0;
|
||||
|
||||
_logger.LogInformation(
|
||||
|
||||
Reference in New Issue
Block a user