[sheepdog] [PATCH v8 2/7] tests/functional: add 067 for testing concurrent start up
Kai Zhang
kyle at zelin.io
Wed Jun 26 05:01:23 CEST 2013
Signed-off-by: Kai Zhang <kyle at zelin.io>
---
tests/functional/067 | 49 ++++++++++++++++++++++++++++++++++++++++++++++
tests/functional/067.out | 13 ++++++++++++
tests/functional/group | 1 +
3 files changed, 63 insertions(+)
create mode 100755 tests/functional/067
create mode 100644 tests/functional/067.out
diff --git a/tests/functional/067 b/tests/functional/067
new file mode 100755
index 0000000..efde075
--- /dev/null
+++ b/tests/functional/067
@@ -0,0 +1,49 @@
+#!/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
+
+# make sure sheep1 and sheep2 quit simutaniously
+_kill_sheep 1 &
+_kill_sheep 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/067.out b/tests/functional/067.out
new file mode 100644
index 0000000..2c3f730
--- /dev/null
+++ b/tests/functional/067.out
@@ -0,0 +1,13 @@
+QA output created by 067
+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 259be76..fbe091b 100644
--- a/tests/functional/group
+++ b/tests/functional/group
@@ -80,3 +80,4 @@
064 auto quick cluster
065 auto quick cluster md
066 auto quick cluster md
+067 auto quick cluster
--
1.7.9.5
More information about the sheepdog
mailing list