From: antirez Date: Tue, 13 Nov 2012 17:11:48 +0000 (+0100) Subject: Test: check if MIGRATE is caching connections. X-Git-Url: https://git.saurik.com/redis.git/commitdiff_plain/17411f7afd30f76962652e28c408dcd07e213fd9 Test: check if MIGRATE is caching connections. --- diff --git a/tests/unit/dump.tcl b/tests/unit/dump.tcl index 202098da..4ebce0ca 100644 --- a/tests/unit/dump.tcl +++ b/tests/unit/dump.tcl @@ -186,4 +186,23 @@ start_server {tags {"dump"}} { assert_match {IOERR*} $e } } + + test {MIGRATE is caching connections} { + set first [srv 0 client] + r set key "Some Value" + start_server {tags {"repl"}} { + set second [srv 0 client] + set second_host [srv 0 host] + set second_port [srv 0 port] + + assert {[$first exists key] == 1} + assert {[$second exists key] == 0} + + set rd [redis_deferring_client] + $rd debug sleep 5.0 ; # Make second server unable to reply. + set e {} + catch {r -1 migrate $second_host $second_port key 9 1000} e + assert_match {IOERR*} $e + } + } }