[sheepdog] [PATCH 2/2] tests/050: fix suprious failure

Liu Yuan namei.unix at gmail.com
Wed Feb 6 10:43:42 CET 2013


From: Liu Yuan <tailai.ly at taobao.com>

Don't sleep because we now do no-sync write, which is quite fast.

Signed-off-by: Liu Yuan <tailai.ly at taobao.com>
---
 tests/050 |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/050 b/tests/050
index 3fa2fca..532bcc1 100755
--- a/tests/050
+++ b/tests/050
@@ -34,13 +34,14 @@ $COLLIE cluster format
 $COLLIE vdi create test 100M
 dd if=/dev/zero | $COLLIE vdi write test &
 
-sleep 1
 # simulate IO NIC down of sheep 1
 iptables -A INPUT -p tcp --sport 8001 -j DROP
 iptables -A INPUT -p tcp --dport 8001 -j DROP
 
 # wait for collie to finish
 wait
+# I need this sync() to get rid of supurious failure. No idea why it happens.
+sync
 
 if [ "`grep fallback $STORE/0/sheep.log`" ];then
 	echo fallback done
-- 
1.7.9.5




More information about the sheepdog mailing list