PUBSUB test reliability: A client race was erroneously failing tests (test only issue)
Former-commit-id: 5147f0153ad1efb827a1709c10cd0f58e6ae65d8
This commit is contained in:
parent
8919c770fe
commit
9ab9a7684d
@ -107,6 +107,8 @@ start_server {tags {"pubsub"}} {
|
|||||||
set rd1 [redis_deferring_client]
|
set rd1 [redis_deferring_client]
|
||||||
assert_equal {1 2 3} [subscribe $rd1 {chan1 chan2 chan3}]
|
assert_equal {1 2 3} [subscribe $rd1 {chan1 chan2 chan3}]
|
||||||
unsubscribe $rd1
|
unsubscribe $rd1
|
||||||
|
# Wait for a response to the unsub
|
||||||
|
__consume_subscribe_messages $rd1 unsubscribe {chan1 chan2 chan3}
|
||||||
assert_equal 0 [r publish chan1 hello]
|
assert_equal 0 [r publish chan1 hello]
|
||||||
assert_equal 0 [r publish chan2 hello]
|
assert_equal 0 [r publish chan2 hello]
|
||||||
assert_equal 0 [r publish chan3 hello]
|
assert_equal 0 [r publish chan3 hello]
|
||||||
@ -180,6 +182,8 @@ start_server {tags {"pubsub"}} {
|
|||||||
set rd1 [redis_deferring_client]
|
set rd1 [redis_deferring_client]
|
||||||
assert_equal {1 2 3} [psubscribe $rd1 {chan1.* chan2.* chan3.*}]
|
assert_equal {1 2 3} [psubscribe $rd1 {chan1.* chan2.* chan3.*}]
|
||||||
punsubscribe $rd1
|
punsubscribe $rd1
|
||||||
|
# Wait for a response to the unsub
|
||||||
|
__consume_subscribe_messages $rd1 punsubscribe {chan1.* chan2.* chan3.*}
|
||||||
assert_equal 0 [r publish chan1.hi hello]
|
assert_equal 0 [r publish chan1.hi hello]
|
||||||
assert_equal 0 [r publish chan2.hi hello]
|
assert_equal 0 [r publish chan2.hi hello]
|
||||||
assert_equal 0 [r publish chan3.hi hello]
|
assert_equal 0 [r publish chan3.hi hello]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user