Skip to content

Commit

Permalink
Test: check if MIGRATE is caching connections.
Browse files Browse the repository at this point in the history
  • Loading branch information
antirez committed Nov 14, 2012
1 parent 05705bc commit 17411f7
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/unit/dump.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}

0 comments on commit 17411f7

Please sign in to comment.