[sheepdog] [PATCH] test/func: wait after starting or killing sheep

Ruoyu liangry at ucweb.com
Wed Aug 20 14:54:29 CEST 2014


Otherwise, test will be failure if using zookeeper as cluster manager.

Signed-off-by: Ruoyu <liangry at ucweb.com>
---
 tests/functional/028 | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/functional/028 b/tests/functional/028
index ff813c5..3554160 100755
--- a/tests/functional/028
+++ b/tests/functional/028
@@ -20,8 +20,9 @@ $DOG vdi read test | md5sum
 
 for i in 2 3; do
     _start_sheep $i
-    sleep 1
+    _wait_for_sheep 3 $i
     _kill_sheep $(($i-2))
+    _wait_for_sheep 2 $i
     _wait_for_sheep_recovery $i
 done
 
@@ -34,8 +35,9 @@ $DOG vdi read test -p 7002 | md5sum
 
 for i in 2 3; do
     _start_sheep $(($i-2))
-    sleep 1
+    _wait_for_sheep 3 $(($i-2))
     _kill_sheep $i
+    _wait_for_sheep 2 $(($i-2))
     _wait_for_sheep_recovery $(($i-2))
 done
 
-- 
1.8.3.2





More information about the sheepdog mailing list