[sheepdog] [PATCH v5 2/6] tests/functional: add 066 for testing concurrent start up

Kai Zhang kyle at zelin.io
Thu Jun 20 21:00:18 CEST 2013


Signed-off-by: Kai Zhang <kyle at zelin.io>
---
 tests/functional/066     |   48 ++++++++++++++++++++++++++++++++++++++++++++++
 tests/functional/066.out |   13 +++++++++++++
 tests/functional/group   |    1 +
 3 files changed, 62 insertions(+)
 create mode 100755 tests/functional/066
 create mode 100644 tests/functional/066.out

diff --git a/tests/functional/066 b/tests/functional/066
new file mode 100755
index 0000000..d6aad11
--- /dev/null
+++ b/tests/functional/066
@@ -0,0 +1,48 @@
+#!/bin/bash
+
+# Test concurrent start up
+
+seq=`basename $0`
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1        # failure is the default!
+
+# get standard environment, filters and checks
+. ./common.rc
+. ./common.filter
+
+_cleanup
+
+for i in 0 1 2; do
+    _start_sheep $i
+done
+
+_wait_for_sheep 3
+
+_cluster_format
+
+$COLLIE node list
+
+pkill -9 -f "$SHEEP_PROG $STORE/1"
+pkill -9 -f "$SHEEP_PROG $STORE/2"
+_wait_for_sheep_stop 1
+_wait_for_sheep_stop 2
+
+sleep 3
+
+for i in 2 1 ; do
+    _start_sheep $i
+done
+
+_kill_sheep 0
+_wait_for_sheep_stop 0
+_wait_for_sheep 2 2
+
+sleep 1
+
+echo check whether all nodes have the same cluster info
+for i in 1 2; do
+    $COLLIE node list -p 700$i
+done
diff --git a/tests/functional/066.out b/tests/functional/066.out
new file mode 100644
index 0000000..455454e
--- /dev/null
+++ b/tests/functional/066.out
@@ -0,0 +1,13 @@
+QA output created by 066
+using backend plain store
+M   Id   Host:Port         V-Nodes       Zone
+-    0   127.0.0.1:7000      	64          0
+-    1   127.0.0.1:7001      	64          1
+-    2   127.0.0.1:7002      	64          2
+check whether all nodes have the same cluster info
+M   Id   Host:Port         V-Nodes       Zone
+-    0   127.0.0.1:7001      	64          1
+-    1   127.0.0.1:7002      	64          2
+M   Id   Host:Port         V-Nodes       Zone
+-    0   127.0.0.1:7001      	64          1
+-    1   127.0.0.1:7002      	64          2
diff --git a/tests/functional/group b/tests/functional/group
index 73ab542..b9515a4 100644
--- a/tests/functional/group
+++ b/tests/functional/group
@@ -78,3 +78,4 @@
 062 auto quick cluster md
 063 auto quick cluster
 064 auto quick cluster
+066 auto quick cluster
-- 
1.7.9.5




More information about the sheepdog mailing list