From 17411f7afd30f76962652e28c408dcd07e213fd9 Mon Sep 17 00:00:00 2001 From: antirez Date: Tue, 13 Nov 2012 18:11:48 +0100 Subject: [PATCH 1/1] Test: check if MIGRATE is caching connections. --- tests/unit/dump.tcl | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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 + } + } } -- 2.47.2