From 552958c95ff4c4fea7c370a87e937e4a88973da1 Mon Sep 17 00:00:00 2001 From: Atin Mukherjee Date: Wed, 4 Feb 2015 14:13:05 +0530 Subject: tests : spurious failure fix in heald.t Problem : heald.t uses EXPECT to check whether shd process is up or not, but as shd is spawned with NO_WAIT end of volume start transaction doesn't gurantee that the process will be up by that time. Solution : Use EXPECT_WITHIN instead of EXPECT Change-Id: Ic81725aa7e7cde9c0c873837fcc4a73d8318dfa0 BUG: 1163543 Signed-off-by: Atin Mukherjee Reviewed-on: http://review.gluster.org/9575 Reviewed-by: Pranith Kumar Karampuri Reviewed-by: Shyamsundar Ranganathan Tested-by: Gluster Build System Reviewed-by: Krishnan Parthasarathi Tested-by: Krishnan Parthasarathi --- tests/basic/glusterd/heald.t | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/basic') diff --git a/tests/basic/glusterd/heald.t b/tests/basic/glusterd/heald.t index 6683ea2c500..bdfda8ff0d6 100644 --- a/tests/basic/glusterd/heald.t +++ b/tests/basic/glusterd/heald.t @@ -34,28 +34,28 @@ TEST ! $CLI volume heal st disable TEST $CLI volume create r2 replica 2 $H0:$B0/r2_0 $H0:$B0/r2_1 TEST "[ -z $(get_shd_process_pid)]" TEST $CLI volume start r2 -EXPECT "[0-9][0-9]*" get_shd_process_pid +EXPECT_WITHIN $PROCESS_UP_TIMEOUT "[0-9][0-9]*" get_shd_process_pid TEST $CLI volume heal r2 enable EXPECT "enable" volume_option r2 "cluster.self-heal-daemon" EXPECT "enable" volgen_volume_option $volfile r2-replicate-0 cluster replicate self-heal-daemon -EXPECT "[0-9][0-9]*" get_shd_process_pid +EXPECT_WITHIN $PROCESS_UP_TIMEOUT "[0-9][0-9]*" get_shd_process_pid TEST $CLI volume heal r2 disable EXPECT "disable" volume_option r2 "cluster.self-heal-daemon" EXPECT "disable" volgen_volume_option $volfile r2-replicate-0 cluster replicate self-heal-daemon -EXPECT "[0-9][0-9]*" get_shd_process_pid +EXPECT_WITHIN $PROCESS_UP_TIMEOUT "[0-9][0-9]*" get_shd_process_pid # Commands should work on disperse volume. TEST $CLI volume create ec2 disperse 3 redundancy 1 $H0:$B0/ec2_0 $H0:$B0/ec2_1 $H0:$B0/ec2_2 TEST $CLI volume start ec2 -EXPECT "[0-9][0-9]*" get_shd_process_pid +EXPECT_WITHIN $PROCESS_UP_TIMEOUT "[0-9][0-9]*" get_shd_process_pid TEST $CLI volume heal ec2 enable EXPECT "enable" volume_option ec2 "cluster.disperse-self-heal-daemon" EXPECT "enable" volgen_volume_option $volfile ec2-disperse-0 cluster disperse self-heal-daemon -EXPECT "[0-9][0-9]*" get_shd_process_pid +EXPECT_WITHIN $PROCESS_UP_TIMEOUT "[0-9][0-9]*" get_shd_process_pid TEST $CLI volume heal ec2 disable EXPECT "disable" volume_option ec2 "cluster.disperse-self-heal-daemon" EXPECT "disable" volgen_volume_option $volfile ec2-disperse-0 cluster disperse self-heal-daemon -EXPECT "[0-9][0-9]*" get_shd_process_pid +EXPECT_WITHIN $PROCESS_UP_TIMEOUT "[0-9][0-9]*" get_shd_process_pid #Check that shd graph is rewritten correctly on volume stop/start EXPECT "Y" volgen_volume_exists $volfile ec2-disperse-0 cluster disperse -- cgit