mirror of
https://github.com/fluencelabs/redis
synced 2025-03-18 16:40:50 +00:00
Test: Pub/Sub PING.
This commit is contained in:
parent
420584a46d
commit
509c888dfa
@ -47,6 +47,22 @@ start_server {tags {"pubsub"}} {
|
||||
__consume_subscribe_messages $client punsubscribe $channels
|
||||
}
|
||||
|
||||
test "Pub/Sub PING" {
|
||||
set rd1 [redis_deferring_client]
|
||||
subscribe $rd1 somechannel
|
||||
# While subscribed to non-zero channels PING works in Pub/Sub mode.
|
||||
$rd1 ping
|
||||
$rd1 ping "foo"
|
||||
set reply1 [$rd1 read]
|
||||
set reply2 [$rd1 read]
|
||||
unsubscribe $rd1 somechannel
|
||||
# Now we are unsubscribed, PING should just return PONG.
|
||||
$rd1 ping
|
||||
set reply3 [$rd1 read]
|
||||
$rd1 close
|
||||
list $reply1 $reply2 $reply3
|
||||
} {{pong {}} {pong foo} PONG}
|
||||
|
||||
test "PUBLISH/SUBSCRIBE basics" {
|
||||
set rd1 [redis_deferring_client]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user