[sheepdog] [PATCH 2/3] tests: add tests to check message order of format operation

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Thu Aug 30 02:36:16 CEST 2012


Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
 tests/036     |   35 ++++++++++++++++++++++++
 tests/036.out |   82 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/037     |   41 ++++++++++++++++++++++++++++
 tests/037.out |   82 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/038     |   45 +++++++++++++++++++++++++++++++
 tests/038.out |   82 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/group   |    3 ++
 7 files changed, 370 insertions(+), 0 deletions(-)
 create mode 100755 tests/036
 create mode 100644 tests/036.out
 create mode 100755 tests/037
 create mode 100644 tests/037.out
 create mode 100755 tests/038
 create mode 100644 tests/038.out

diff --git a/tests/036 b/tests/036
new file mode 100755
index 0000000..81f58eb
--- /dev/null
+++ b/tests/036
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+# Test format cluster just after sheeps 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 `seq 0 7`; do
+    _start_sheep $i
+done
+
+while true; do
+    $COLLIE cluster format 2> /dev/null
+    if [ $? == 0 ]; then
+        break
+    fi
+    # try again until at least one sheep starts up
+done
+
+_wait_for_sheep 8
+
+for i in `seq 0 7`; do
+    $COLLIE cluster info -p 700$i | head -1
+    $COLLIE node list -p 700$i
+done
diff --git a/tests/036.out b/tests/036.out
new file mode 100644
index 0000000..f0a32a2
--- /dev/null
+++ b/tests/036.out
@@ -0,0 +1,82 @@
+QA output created by 036
+using backend farm store
+Cluster status: running
+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
+-    3   127.0.0.1:7003      	64          3
+-    4   127.0.0.1:7004      	64          4
+-    5   127.0.0.1:7005      	64          5
+-    6   127.0.0.1:7006      	64          6
+-    7   127.0.0.1:7007      	64          7
+Cluster status: running
+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
+-    3   127.0.0.1:7003      	64          3
+-    4   127.0.0.1:7004      	64          4
+-    5   127.0.0.1:7005      	64          5
+-    6   127.0.0.1:7006      	64          6
+-    7   127.0.0.1:7007      	64          7
+Cluster status: running
+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
+-    3   127.0.0.1:7003      	64          3
+-    4   127.0.0.1:7004      	64          4
+-    5   127.0.0.1:7005      	64          5
+-    6   127.0.0.1:7006      	64          6
+-    7   127.0.0.1:7007      	64          7
+Cluster status: running
+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
+-    3   127.0.0.1:7003      	64          3
+-    4   127.0.0.1:7004      	64          4
+-    5   127.0.0.1:7005      	64          5
+-    6   127.0.0.1:7006      	64          6
+-    7   127.0.0.1:7007      	64          7
+Cluster status: running
+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
+-    3   127.0.0.1:7003      	64          3
+-    4   127.0.0.1:7004      	64          4
+-    5   127.0.0.1:7005      	64          5
+-    6   127.0.0.1:7006      	64          6
+-    7   127.0.0.1:7007      	64          7
+Cluster status: running
+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
+-    3   127.0.0.1:7003      	64          3
+-    4   127.0.0.1:7004      	64          4
+-    5   127.0.0.1:7005      	64          5
+-    6   127.0.0.1:7006      	64          6
+-    7   127.0.0.1:7007      	64          7
+Cluster status: running
+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
+-    3   127.0.0.1:7003      	64          3
+-    4   127.0.0.1:7004      	64          4
+-    5   127.0.0.1:7005      	64          5
+-    6   127.0.0.1:7006      	64          6
+-    7   127.0.0.1:7007      	64          7
+Cluster status: running
+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
+-    3   127.0.0.1:7003      	64          3
+-    4   127.0.0.1:7004      	64          4
+-    5   127.0.0.1:7005      	64          5
+-    6   127.0.0.1:7006      	64          6
+-    7   127.0.0.1:7007      	64          7
diff --git a/tests/037 b/tests/037
new file mode 100755
index 0000000..859cd8c
--- /dev/null
+++ b/tests/037
@@ -0,0 +1,41 @@
+#!/bin/bash
+
+# Test node failure just after format
+
+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 `seq 0 7`; do
+    _start_sheep $i
+done
+
+_wait_for_sheep 8
+
+$COLLIE cluster format &
+
+for i in `seq 4 7`; do
+    _kill_sheep $i
+done
+
+_wait_for_collie
+
+for i in `seq 4 7`; do
+    _start_sheep $i
+done
+
+_wait_for_sheep "8"
+
+for i in `seq 0 7`; do
+    $COLLIE cluster info -p 700$i | head -1
+    $COLLIE node list -p 700$i
+done
diff --git a/tests/037.out b/tests/037.out
new file mode 100644
index 0000000..a2e6ff9
--- /dev/null
+++ b/tests/037.out
@@ -0,0 +1,82 @@
+QA output created by 037
+using backend farm store
+Cluster status: running
+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
+-    3   127.0.0.1:7003      	64          3
+-    4   127.0.0.1:7004      	64          4
+-    5   127.0.0.1:7005      	64          5
+-    6   127.0.0.1:7006      	64          6
+-    7   127.0.0.1:7007      	64          7
+Cluster status: running
+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
+-    3   127.0.0.1:7003      	64          3
+-    4   127.0.0.1:7004      	64          4
+-    5   127.0.0.1:7005      	64          5
+-    6   127.0.0.1:7006      	64          6
+-    7   127.0.0.1:7007      	64          7
+Cluster status: running
+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
+-    3   127.0.0.1:7003      	64          3
+-    4   127.0.0.1:7004      	64          4
+-    5   127.0.0.1:7005      	64          5
+-    6   127.0.0.1:7006      	64          6
+-    7   127.0.0.1:7007      	64          7
+Cluster status: running
+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
+-    3   127.0.0.1:7003      	64          3
+-    4   127.0.0.1:7004      	64          4
+-    5   127.0.0.1:7005      	64          5
+-    6   127.0.0.1:7006      	64          6
+-    7   127.0.0.1:7007      	64          7
+Cluster status: running
+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
+-    3   127.0.0.1:7003      	64          3
+-    4   127.0.0.1:7004      	64          4
+-    5   127.0.0.1:7005      	64          5
+-    6   127.0.0.1:7006      	64          6
+-    7   127.0.0.1:7007      	64          7
+Cluster status: running
+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
+-    3   127.0.0.1:7003      	64          3
+-    4   127.0.0.1:7004      	64          4
+-    5   127.0.0.1:7005      	64          5
+-    6   127.0.0.1:7006      	64          6
+-    7   127.0.0.1:7007      	64          7
+Cluster status: running
+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
+-    3   127.0.0.1:7003      	64          3
+-    4   127.0.0.1:7004      	64          4
+-    5   127.0.0.1:7005      	64          5
+-    6   127.0.0.1:7006      	64          6
+-    7   127.0.0.1:7007      	64          7
+Cluster status: running
+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
+-    3   127.0.0.1:7003      	64          3
+-    4   127.0.0.1:7004      	64          4
+-    5   127.0.0.1:7005      	64          5
+-    6   127.0.0.1:7006      	64          6
+-    7   127.0.0.1:7007      	64          7
diff --git a/tests/038 b/tests/038
new file mode 100755
index 0000000..224d136
--- /dev/null
+++ b/tests/038
@@ -0,0 +1,45 @@
+#!/bin/bash
+
+# Test format cluster during node membership changes
+
+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 `seq 0 7`; do
+    _start_sheep $i
+done
+
+while true; do
+    $COLLIE cluster format 2> /dev/null
+    if [ $? == 0 ]; then
+        break
+    fi
+    # try again until at least one sheep starts up
+done &
+
+for i in `seq 4 7`; do
+    _kill_sheep $i
+done
+
+_wait_for_collie
+
+for i in `seq 4 7`; do
+    _start_sheep $i
+done
+
+_wait_for_sheep "8"
+
+for i in `seq 0 7`; do
+    $COLLIE cluster info -p 700$i | head -1
+    $COLLIE node list -p 700$i
+done
diff --git a/tests/038.out b/tests/038.out
new file mode 100644
index 0000000..284a909
--- /dev/null
+++ b/tests/038.out
@@ -0,0 +1,82 @@
+QA output created by 038
+using backend farm store
+Cluster status: running
+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
+-    3   127.0.0.1:7003      	64          3
+-    4   127.0.0.1:7004      	64          4
+-    5   127.0.0.1:7005      	64          5
+-    6   127.0.0.1:7006      	64          6
+-    7   127.0.0.1:7007      	64          7
+Cluster status: running
+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
+-    3   127.0.0.1:7003      	64          3
+-    4   127.0.0.1:7004      	64          4
+-    5   127.0.0.1:7005      	64          5
+-    6   127.0.0.1:7006      	64          6
+-    7   127.0.0.1:7007      	64          7
+Cluster status: running
+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
+-    3   127.0.0.1:7003      	64          3
+-    4   127.0.0.1:7004      	64          4
+-    5   127.0.0.1:7005      	64          5
+-    6   127.0.0.1:7006      	64          6
+-    7   127.0.0.1:7007      	64          7
+Cluster status: running
+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
+-    3   127.0.0.1:7003      	64          3
+-    4   127.0.0.1:7004      	64          4
+-    5   127.0.0.1:7005      	64          5
+-    6   127.0.0.1:7006      	64          6
+-    7   127.0.0.1:7007      	64          7
+Cluster status: running
+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
+-    3   127.0.0.1:7003      	64          3
+-    4   127.0.0.1:7004      	64          4
+-    5   127.0.0.1:7005      	64          5
+-    6   127.0.0.1:7006      	64          6
+-    7   127.0.0.1:7007      	64          7
+Cluster status: running
+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
+-    3   127.0.0.1:7003      	64          3
+-    4   127.0.0.1:7004      	64          4
+-    5   127.0.0.1:7005      	64          5
+-    6   127.0.0.1:7006      	64          6
+-    7   127.0.0.1:7007      	64          7
+Cluster status: running
+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
+-    3   127.0.0.1:7003      	64          3
+-    4   127.0.0.1:7004      	64          4
+-    5   127.0.0.1:7005      	64          5
+-    6   127.0.0.1:7006      	64          6
+-    7   127.0.0.1:7007      	64          7
+Cluster status: running
+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
+-    3   127.0.0.1:7003      	64          3
+-    4   127.0.0.1:7004      	64          4
+-    5   127.0.0.1:7005      	64          5
+-    6   127.0.0.1:7006      	64          6
+-    7   127.0.0.1:7007      	64          7
diff --git a/tests/group b/tests/group
index 1dafad4..de658b9 100644
--- a/tests/group
+++ b/tests/group
@@ -47,3 +47,6 @@
 033 auto quick store
 034 auto quick store
 035 auto quick cluster
+036 auto quick cluster
+037 auto quick cluster
+038 auto quick cluster
-- 
1.7.2.5




More information about the sheepdog mailing list