[sheepdog] [PATCH 1/3] tests: add test to check sheep joining with old objects
MORITA Kazutaka
morita.kazutaka at lab.ntt.co.jp
Sun Aug 26 12:50:14 CEST 2012
This tests whether clients can read the latest data when sheeps join
to the cluster with old objects.
Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
tests/034 | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
tests/034.out | 11 +++++++++++
tests/group | 1 +
3 files changed, 67 insertions(+), 0 deletions(-)
create mode 100755 tests/034
create mode 100644 tests/034.out
diff --git a/tests/034 b/tests/034
new file mode 100755
index 0000000..c0ad374
--- /dev/null
+++ b/tests/034
@@ -0,0 +1,55 @@
+#!/bin/bash
+
+# Test sheep joining with older objects
+
+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
+
+# start 8 nodes
+for i in `seq 0 7`; do
+ _start_sheep $i
+done
+
+_wait_for_sheep 8
+
+$COLLIE cluster format
+
+$COLLIE vdi create test 100MB
+# create 25 objects
+for i in `seq 0 24`; do
+ echo $i | $COLLIE vdi write test $((i * 4 * 1024 * 1024)) 512
+done
+
+# kill 5 nodes
+for i in `seq 3 7`; do
+ _wait_for_sheep_recovery 0
+ _kill_sheep $i
+done
+
+# update vdi
+for i in `seq 0 24`; do
+ echo $(($i + 100)) | $COLLIE vdi write test $((i * 4 * 1024 * 1024)) 512
+done
+
+$COLLIE vdi read test | md5sum
+
+# start 5 nodes who have old objects
+for i in `seq 3 7`; do
+ _start_sheep $i
+done
+
+_wait_for_sheep 8
+
+for i in `seq 0 7`; do
+ $COLLIE vdi read test -p 700$i | md5sum
+done
diff --git a/tests/034.out b/tests/034.out
new file mode 100644
index 0000000..0aa4a57
--- /dev/null
+++ b/tests/034.out
@@ -0,0 +1,11 @@
+QA output created by 034
+using backend farm store
+b26a14b4868dff70944564c6cb446e28 -
+b26a14b4868dff70944564c6cb446e28 -
+b26a14b4868dff70944564c6cb446e28 -
+b26a14b4868dff70944564c6cb446e28 -
+b26a14b4868dff70944564c6cb446e28 -
+b26a14b4868dff70944564c6cb446e28 -
+b26a14b4868dff70944564c6cb446e28 -
+b26a14b4868dff70944564c6cb446e28 -
+b26a14b4868dff70944564c6cb446e28 -
diff --git a/tests/group b/tests/group
index d6a642b..d20de40 100644
--- a/tests/group
+++ b/tests/group
@@ -45,3 +45,4 @@
031 auto quick vdi
032 auto quick store
033 auto quick store
+034 auto quick store
--
1.7.2.5
More information about the sheepdog
mailing list