Skip to content

Commit 7c1563e

Browse files
committed
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.
1 parent 82e68d6 commit 7c1563e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

StackExchange.Redis.Tests/Scans.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public void ScanResume()
9696
int i;
9797
for (i = 0; i < 100; i++)
9898
{
99-
db.StringSet("ScanResume:" + i, Guid.NewGuid().ToString(), flags: CommandFlags.FireAndForget);
99+
db.StringSet("ScanResume:" + i, Guid.NewGuid().ToString());
100100
}
101101

102102
var expected = new HashSet<string>();
@@ -123,7 +123,7 @@ public void ScanResume()
123123
Output.WriteLine($"Expected: 43, Actual: {expected.Count}, Cursor: {snapCursor}, Offset: {snapOffset}, PageSize: {snapPageSize}");
124124
Assert.Equal(43, expected.Count);
125125
Assert.NotEqual(0, snapCursor);
126-
Assert.Equal(11, snapOffset);
126+
Assert.Equal(12, snapOffset);
127127
Assert.Equal(15, snapPageSize);
128128

129129
seq = server.Keys(DB, "ScanResume:*", pageSize: 15, cursor: snapCursor, pageOffset: snapOffset);

0 commit comments

Comments
 (0)