fixed seqid test, added timestamp extraction
.NET Test / .NET tests (push) Successful in 1m55s

This commit is contained in:
2026-07-10 22:06:37 +04:00
parent 566c813e8d
commit 8e961352d2
4 changed files with 188 additions and 7 deletions
+3 -3
View File
@@ -86,11 +86,11 @@ public class NextId
var time = TestEpoch.AddMilliseconds(200);
// Act & Assert
for (int i = 0; i < 255; i++)
for (int i = 0; i < 256; i++)
{
_seqId.Next(time); // Exhauste sequence
_seqId.Next(time); // Use all 256 sequence values (0-255)
}
Action act = () => _seqId.Next(time);
Action act = () => _seqId.Next(time); // 257th call should throw
act.ShouldThrow<IndexOutOfRangeException>()
.WithMessage("Refused to create new SeqId. Sequence exhausted.");
}