diff options
author | antirez <antirez@gmail.com> | 2016-01-15 16:50:35 +0100 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2016-01-25 15:21:57 +0100 |
commit | 4300a973b8ba573e0b65f329335edf8069f5b94f (patch) | |
tree | 97f2b639f0ea578570c21b7364b6cd5ce98e7105 | |
parent | 5a402ce2d5b02472179badf5f945b8ca17ec5674 (diff) | |
download | redis-4300a973b8ba573e0b65f329335edf8069f5b94f.tar.gz |
Test: Handle LOADING in restart_instance.
-rw-r--r-- | tests/instances.tcl | 12 |
1 files changed, 12 insertions, 0 deletions
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 + } + } } |