diff options
author | hari gowtham <hgowtham@redhat.com> | 2017-11-29 11:23:40 +0530 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2017-11-30 10:15:10 +0000 |
commit | eb013e4c180014238c95d58f67246ff19b40c437 (patch) | |
tree | a4eee4844ba5720d6df0c28b649bcf4d3759633c /tests | |
parent | 5b4b25c697f93d3dfe352013a442f2ec73fd3b8b (diff) |
tests: fix for bug-1260185-donot-allow-detach-commit-unnecessarily.t failure
problem: detach commit was issues before detach start was completed.
fix: wait for detach start to finish and then detach commit.
Change-Id: I639962be6de6dbd1512f0a5617050d1e6872eac8
BUG: 1517961
Signed-off-by: hari gowtham <hgowtham@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/basic/tier/bug-1260185-donot-allow-detach-commit-unnecessarily.t (renamed from tests/bugs/glusterd/bug-1260185-donot-allow-detach-commit-unnecessarily.t) | 8 | ||||
-rw-r--r-- | tests/tier.rc | 4 |
2 files changed, 7 insertions, 5 deletions
diff --git a/tests/bugs/glusterd/bug-1260185-donot-allow-detach-commit-unnecessarily.t b/tests/basic/tier/bug-1260185-donot-allow-detach-commit-unnecessarily.t index a46df4ed704..6efbe32f121 100644 --- a/tests/bugs/glusterd/bug-1260185-donot-allow-detach-commit-unnecessarily.t +++ b/tests/basic/tier/bug-1260185-donot-allow-detach-commit-unnecessarily.t @@ -7,6 +7,7 @@ . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc . $(dirname $0)/../../cluster.rc +. $(dirname $0)/../../tier.rc cleanup; @@ -38,12 +39,9 @@ TEST $CLI volume tier $V0 attach $H0:$B0/${V0}{5..6} TEST $CLI volume tier $V0 detach start ## Now detach-tier commit on volume $V0 should succeed. -TEST $CLI volume tier $V0 detach commit +## wait for the detach to complete +EXPECT_WITHIN $PROCESS_UP_TIMEOUT "1" tier_detach_commit_for_single_node cleanup; -# Mainly marking it as known-issue as it is consistently failing. -# Revert back once fixing this. - #G_TESTDEF_TEST_STATUS_NETBSD7=KNOWN_ISSUE,BUG=1517961 -#G_TESTDEF_TEST_STATUS_CENTOS6=KNOWN_ISSUE,BUG=1517961 diff --git a/tests/tier.rc b/tests/tier.rc index da6b0ee4777..88acdc791eb 100644 --- a/tests/tier.rc +++ b/tests/tier.rc @@ -153,3 +153,7 @@ function tier_detach_status () { function wait_for_tier_start () { sleep 5 } + +function tier_detach_commit_for_single_node () { + $CLI volume tier $V0 detach commit | grep "success" | wc -l +} |