[sheepdog] [PATCH 1/2] tests/functional: wait for recovery outside of _simulate_machine_down

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Tue Jul 23 10:57:09 CEST 2013


Not all the users don't want to wait for recovery after network
failure emulation.

Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
 tests/functional/035       | 2 ++
 tests/functional/common.rc | 1 -
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/functional/035 b/tests/functional/035
index bcc044a..e822e96 100755
--- a/tests/functional/035
+++ b/tests/functional/035
@@ -41,6 +41,7 @@ sleep 3
 # Test write timeout
 for i in `seq 1 4`; do
 	_simulate_machine_down $i
+	_wait_for_sheep_recovery 0
 done
 
 # wait for collie to finish
@@ -63,6 +64,7 @@ _wait_for_sheep_recovery 0
 $COLLIE vdi read test | md5sum > $STORE/csum.2 &
 for i in `seq 5 7`; do
 	_simulate_machine_down $i
+	_wait_for_sheep_recovery 0
 done
 wait
 
diff --git a/tests/functional/common.rc b/tests/functional/common.rc
index f621261..0aced36 100644
--- a/tests/functional/common.rc
+++ b/tests/functional/common.rc
@@ -355,7 +355,6 @@ _simulate_machine_down()
 	sleep 3
 	# Trigger the confchg because cluster driver doesn't know we'er offline
 	_kill_sheep $1
-	_wait_for_sheep_recovery 0
 }
 
 # Cleanup the iptables rules used to simulate machine down
-- 
1.8.1.3.566.gaa39828




More information about the sheepdog mailing list