summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDan Lambright <dlambrig@redhat.com>2015-03-22 15:27:14 -0400
committerNiels de Vos <ndevos@redhat.com>2015-03-23 02:18:57 -0700
commit507f3251f39405332fc1181e7004b60637f26be6 (patch)
tree960e54d51998fc8950edcf7ecf1bd367aca8ba26 /tests
parent20355992e8eed7d3ed78a23bc7e922d6ae94860d (diff)
cluster/dht: Fix spurious failure in tier test.
Need to wait for a few seconds for rebalancing to complete before stopping volume. Change-Id: Ib81c02645240e7d74ebfb3e31ccbc612fc77b119 BUG: 1194753 Signed-off-by: Dan Lambright <dlambrig@redhat.com> Reviewed-on: http://review.gluster.org/9966 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/basic/tier/tier.t13
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/basic/tier/tier.t b/tests/basic/tier/tier.t
index 6bd6fdf8849..383d4709798 100755
--- a/tests/basic/tier/tier.t
+++ b/tests/basic/tier/tier.t
@@ -36,6 +36,15 @@ function confirm_tier_removed {
fi
}
+function confirm_vol_stopped {
+ $CLI volume stop $1
+ if [ $? == 0 ]; then
+ echo "0"
+ else
+ echo "1"
+ fi
+}
+
LAST_BRICK=1
CACHE_BRICK=2
DEMOTE_TIMEOUT=12
@@ -101,7 +110,7 @@ TEST $CLI volume rebalance $V0 stop
killall glusterd
TEST glusterd
-# TBD: Remove force. Gracefully migrate data off hot tier.
+# TODO: Remove force. Gracefully migrate data off hot tier.
# Rebalance+promotion/demotion is under construction.
TEST $CLI volume detach-tier $V0
@@ -111,6 +120,6 @@ TEST $CLI volume detach-tier $V0
EXPECT "0" confirm_tier_removed ${V0}${CACHE_BRICK}
-TEST $CLI volume stop $V0
+EXPECT_WITHIN $REBALANCE_TIMEOUT "0" confirm_vol_stopped $V0
cleanup