Commit 7c1563e5 authored by Nick Craver's avatar Nick Craver

Tests: bring stability to ScanResume()

There was a race here under load with the last set and the first key scan...let's not do that.
parent 82e68d6c
......@@ -96,7 +96,7 @@ public void ScanResume()
int i;
for (i = 0; i < 100; i++)
{
db.StringSet("ScanResume:" + i, Guid.NewGuid().ToString(), flags: CommandFlags.FireAndForget);
db.StringSet("ScanResume:" + i, Guid.NewGuid().ToString());
}
var expected = new HashSet<string>();
......@@ -123,7 +123,7 @@ public void ScanResume()
Output.WriteLine($"Expected: 43, Actual: {expected.Count}, Cursor: {snapCursor}, Offset: {snapOffset}, PageSize: {snapPageSize}");
Assert.Equal(43, expected.Count);
Assert.NotEqual(0, snapCursor);
Assert.Equal(11, snapOffset);
Assert.Equal(12, snapOffset);
Assert.Equal(15, snapPageSize);
seq = server.Keys(DB, "ScanResume:*", pageSize: 15, cursor: snapCursor, pageOffset: snapOffset);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment