From 466f56a91265ac928759642a866bdc27e850654f Mon Sep 17 00:00:00 2001 From: Avra Sengupta Date: Thu, 5 Nov 2015 18:19:14 +0530 Subject: 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 Reviewed-on: http://review.gluster.org/12516 Tested-by: Gluster Build System Reviewed-by: mohammed rafi kc Reviewed-by: Vijay Bellur --- tests/bugs/snapshot/bug-1275616.t | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests/bugs/snapshot') 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 -- cgit