From 4300a973b8ba573e0b65f329335edf8069f5b94f Mon Sep 17 00:00:00 2001 From: antirez Date: Fri, 15 Jan 2016 16:50:35 +0100 Subject: Test: Handle LOADING in restart_instance. --- tests/instances.tcl | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/instances.tcl b/tests/instances.tcl index ccb11b25b..76754fcdf 100644 --- a/tests/instances.tcl +++ b/tests/instances.tcl @@ -494,5 +494,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 + } + } } -- cgit v1.2.1