summaryrefslogtreecommitdiffstats
path: root/tests/bugs/snapshot
diff options
context:
space:
mode:
authorAvra Sengupta <asengupt@redhat.com>2015-11-05 18:19:14 +0530
committerVijay Bellur <vbellur@redhat.com>2015-11-06 02:29:01 -0800
commit466f56a91265ac928759642a866bdc27e850654f (patch)
tree10365ef8bc34bbb17639f1e04e360b023efa270d /tests/bugs/snapshot
parenta193bb3a711177d64d1c70277a70bb220161a293 (diff)
snapshot: Making bug-1275616.t more regression failure tolerant
snapshot clone creation fails 'spuriously' on the regression setup coz the brick rpc connect for snap3 in the testcase, happens way after the snap was created. So adding a EXPECT_WITHIN $PROCESS_UP_TIMEOUT check(read delay) to help the cause. But this isn't a 100% guaranteed fix, as on an even slower machine, even this check will fail followed by the subsequent failures that this patch is trying to fix in the first place Change-Id: I2f31558b717fd610111f14e451fe444c09f3f254 BUG: 1278418 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/12516 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: mohammed rafi kc <rkavunga@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'tests/bugs/snapshot')
-rwxr-xr-xtests/bugs/snapshot/bug-1275616.t10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/bugs/snapshot/bug-1275616.t b/tests/bugs/snapshot/bug-1275616.t
index fe1684ed003..23083c5a411 100755
--- a/tests/bugs/snapshot/bug-1275616.t
+++ b/tests/bugs/snapshot/bug-1275616.t
@@ -3,6 +3,14 @@
. $(dirname $0)/../../include.rc
. $(dirname $0)/../../snapshot.rc
+function get_snap_brick_status()
+{
+ local snap=$1;
+
+ $CLI snapshot status $snap | grep "Brick Running" | sed 's/.*: //';
+}
+
+
cleanup;
TEST verify_lvm_version;
TEST glusterd;
@@ -36,6 +44,8 @@ TEST $CLI snapshot restore snap2
EXPECT '149' snap_info_volume CLI "Snaps Available" $V0;
EXPECT '150' snap_config_volume CLI 'snap-max-hard-limit' $V0
+EXPECT_WITHIN $PROCESS_UP_TIMEOUT "Yes" get_snap_brick_status snap3
+
#Take a clone and verify it inherits snapshot's snap-max-hard-limit
TEST $CLI snapshot clone clone1 snap3