mirror of
https://github.com/redis/redis.git
synced 2026-05-28 04:02:46 -04:00
Fix flaky cluster pubsubshard test in 26-pubsubshard (#14962)
Some checks are pending
CI / test-ubuntu-latest (push) Waiting to run
CI / test-sanitizer-address (push) Waiting to run
CI / build-debian-old (push) Waiting to run
CI / build-macos-latest (push) Waiting to run
CI / build-32bit (push) Waiting to run
CI / build-libc-malloc (push) Waiting to run
CI / build-centos-jemalloc (push) Waiting to run
CI / build-old-chain-jemalloc (push) Waiting to run
Codecov / code-coverage (push) Waiting to run
External Server Tests / test-external-standalone (push) Waiting to run
External Server Tests / test-external-cluster (push) Waiting to run
External Server Tests / test-external-nodebug (push) Waiting to run
Spellcheck / Spellcheck (push) Waiting to run
Some checks are pending
CI / test-ubuntu-latest (push) Waiting to run
CI / test-sanitizer-address (push) Waiting to run
CI / build-debian-old (push) Waiting to run
CI / build-macos-latest (push) Waiting to run
CI / build-32bit (push) Waiting to run
CI / build-libc-malloc (push) Waiting to run
CI / build-centos-jemalloc (push) Waiting to run
CI / build-old-chain-jemalloc (push) Waiting to run
Codecov / code-coverage (push) Waiting to run
External Server Tests / test-external-standalone (push) Waiting to run
External Server Tests / test-external-cluster (push) Waiting to run
External Server Tests / test-external-nodebug (push) Waiting to run
Spellcheck / Spellcheck (push) Waiting to run
In the "PUBSUB channels/shardchannels" test, we call sunsubscribe without channels, but the number of loops in consume_subscribe_messages() is determined by the size of channels. When channels are empty, the loop will loop 0 times and will not read the sunsubscribe response message returned by the server. This means that when verifying the channel length, the previous command might not have been complete yet, so this PR added a read after sunsubscribe.
This commit is contained in:
parent
8f3b6990dd
commit
effcb5a03c
1 changed files with 1 additions and 0 deletions
|
|
@ -123,6 +123,7 @@ test "PUBSUB channels/shardchannels" {
|
|||
assert_equal {3} [llength [$publishclient pubsub shardchannels]]
|
||||
|
||||
sunsubscribe $subscribeclient
|
||||
$subscribeclient read
|
||||
set channel_list [$publishclient pubsub shardchannels]
|
||||
assert_equal {2} [llength $channel_list]
|
||||
assert {[lsearch -exact $channel_list "\{channel.0\}2"] >= 0}
|
||||
|
|
|
|||
Loading…
Reference in a new issue