summaryrefslogtreecommitdiff
path: root/tests/instances.tcl
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2016-01-15 16:50:35 +0100
committerantirez <antirez@gmail.com>2016-01-15 16:50:35 +0100
commitb01b32b3c358ebd261b931409a8988824e7acc6f (patch)
tree8b46508a45967907b89ce9579055422f4a56917d /tests/instances.tcl
parent5432fc81dbe828aeb9af05549250ffc9557838a0 (diff)
downloadredis-b01b32b3c358ebd261b931409a8988824e7acc6f.tar.gz
Test: Handle LOADING in restart_instance.
Diffstat (limited to 'tests/instances.tcl')
-rw-r--r--tests/instances.tcl12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/instances.tcl b/tests/instances.tcl
index b3c98a294..2ba67ac19 100644
--- a/tests/instances.tcl
+++ b/tests/instances.tcl
@@ -495,5 +495,17 @@ proc restart_instance {type id} {
set link [redis 127.0.0.1 $port]
$link reconnect 1
set_instance_attrib $type $id link $link
+
+ # Make sure the instance is not loading the dataset when this
+ # function returns.
+ while 1 {
+ catch {[$link ping]} retval
+ if {[string match {*LOADING*} $retval]} {
+ after 100
+ continue
+ } else {
+ break
+ }
+ }
}