PUBSUB test reliability: A client race was erroneously failing tests (test only issue)

Former-commit-id: 5147f0153ad1efb827a1709c10cd0f58e6ae65d8
This commit is contained in:
John Sully 2020-05-31 21:26:21 -04:00
parent 8919c770fe
commit 9ab9a7684d

View File

@ -107,6 +107,8 @@ start_server {tags {"pubsub"}} {
set rd1 [redis_deferring_client]
assert_equal {1 2 3} [subscribe $rd1 {chan1 chan2 chan3}]
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 chan2 hello]
assert_equal 0 [r publish chan3 hello]
@ -180,6 +182,8 @@ start_server {tags {"pubsub"}} {
set rd1 [redis_deferring_client]
assert_equal {1 2 3} [psubscribe $rd1 {chan1.* chan2.* chan3.*}]
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 chan2.hi hello]
assert_equal 0 [r publish chan3.hi hello]