diff options
Diffstat (limited to 'tests/unit/moduleapi/cluster.tcl')
-rw-r--r-- | tests/unit/moduleapi/cluster.tcl | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/unit/moduleapi/cluster.tcl b/tests/unit/moduleapi/cluster.tcl index b2d2df899..f1238992d 100644 --- a/tests/unit/moduleapi/cluster.tcl +++ b/tests/unit/moduleapi/cluster.tcl @@ -20,8 +20,10 @@ proc csi {args} { set testmodule [file normalize tests/modules/blockonkeys.so] set testmodule_nokey [file normalize tests/modules/blockonbackground.so] +set testmodule_blockedclient [file normalize tests/modules/blockedclient.so] # make sure the test infra won't use SELECT +set old_singledb $::singledb set ::singledb 1 # cluster creation is complicated with TLS, and the current tests don't really need that coverage @@ -43,6 +45,10 @@ start_server [list overrides $base_conf] { $node2 module load $testmodule_nokey $node3 module load $testmodule_nokey + $node1 module load $testmodule_blockedclient + $node2 module load $testmodule_blockedclient + $node3 module load $testmodule_blockedclient + test {Create 3 node cluster} { exec src/redis-cli --cluster-yes --cluster create \ 127.0.0.1:[srv 0 port] \ @@ -193,6 +199,10 @@ start_server [list overrides $base_conf] { assert_equal [s -1 blocked_clients] {0} } + test "Verify command RM_Call is rejected when cluster is down" { + assert_error "ERR Can not execute a command 'set' while the cluster is down" {$node1 do_rm_call set x 1} + } + exec kill -SIGCONT $node3_pid $node1_rd close $node2_rd close @@ -202,4 +212,6 @@ start_server [list overrides $base_conf] { } } -} ;# tags
\ No newline at end of file +} ;# tags + +set ::singledb $old_singledb |