Unverified Commit d56ded89 authored by leishiao's avatar leishiao Committed by GitHub
Browse files

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: default avatarxiaolei <xiaolei@91jkys.com>
parent 494ee2f1
...@@ -287,6 +287,7 @@ start_server { ...@@ -287,6 +287,7 @@ start_server {
r XADD s2{t} * old abcd1234 r XADD s2{t} * old abcd1234
set rd [redis_deferring_client] set rd [redis_deferring_client]
$rd XREAD BLOCK 20000 STREAMS s1{t} s2{t} s3{t} $ $ $ $rd XREAD BLOCK 20000 STREAMS s1{t} s2{t} s3{t} $ $ $
wait_for_blocked_client
r XADD s2{t} * new abcd1234 r XADD s2{t} * new abcd1234
set res [$rd read] set res [$rd read]
assert {[lindex $res 0 0] eq {s2{t}}} assert {[lindex $res 0 0] eq {s2{t}}}
......
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