Skip to content

Commit 0a8047a

Browse files
author
Gabriel Erzse
committed
Add test for BzmPop without keys
1 parent 794bbca commit 0a8047a

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

tests/NRedisStack.Tests/Core Commands/CoreTests.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,6 @@ public void TestBzmPopNull()
195195
Assert.Null(result);
196196
}
197197

198-
199198
[SkipIfRedis(Is.OSSCluster, Comparison.LessThan, "7.0.0")]
200199
public void TestBzmPopMultiplexerTimeout()
201200
{
@@ -254,4 +253,16 @@ public void TestBzmPopMultipleSets()
254253
Assert.Equal("a", result.Item2[0].Value.ToString());
255254
Assert.Equal("c", result.Item2[1].Value.ToString());
256255
}
256+
257+
[SkipIfRedis(Is.OSSCluster, Comparison.LessThan, "7.0.0")]
258+
public void TestBzmPopNoKeysProvided()
259+
{
260+
var redis = ConnectionMultiplexer.Connect("localhost");
261+
262+
var db = redis.GetDatabase(null);
263+
db.Execute("FLUSHALL");
264+
265+
// Server would wait forever, but the multiplexer times out in 1 second.
266+
Assert.Throws<ArgumentException>(() => db.BzmPop(0, [], Order.Ascending));
267+
}
257268
}

0 commit comments

Comments
 (0)