mirror of
https://github.com/redis/redis.git
synced 2026-04-21 03:01:35 -04:00
improvement of a blocking xread test (#9859)
This test relies on that `XREAD BLOCK 20000 STREAMS s1{t} s2{t} s3{t} $ $ $`
is executed by redis before `XADD s2{t} * new abcd1234`. A ` wait_for_blocked_client`
is needed between the two to ensure the order, otherwise `XADD s2{t} * new abcd1234`
might be executed first due to network delay causing a test failure.
Co-authored-by: xiaolei <xiaolei@91jkys.com>
This commit is contained in:
@@ -287,6 +287,7 @@ start_server {
|
||||
r XADD s2{t} * old abcd1234
|
||||
set rd [redis_deferring_client]
|
||||
$rd XREAD BLOCK 20000 STREAMS s1{t} s2{t} s3{t} $ $ $
|
||||
wait_for_blocked_client
|
||||
r XADD s2{t} * new abcd1234
|
||||
set res [$rd read]
|
||||
assert {[lindex $res 0 0] eq {s2{t}}}
|
||||
|
||||
Reference in New Issue
Block a user