summaryrefslogtreecommitdiffstats
path: root/tests/bugs
diff options
context:
space:
mode:
authorSachin Pandit <spandit@redhat.com>2014-09-23 04:53:47 +0530
committerVijay Bellur <vbellur@redhat.com>2014-09-23 08:50:00 -0700
commit933e5bd5a7b32394c7a3c6e84543dc48ed24a732 (patch)
tree862e4b429cae49fd0144651c0164fe2be852aabf /tests/bugs
parent125e5428d31f5e0b659cbdb9ccdc310991fc1981 (diff)
test : Fix for spurious failure
Problem : Once the features.uss is enabled it does not wait for the process to be created. And if we try to check for the pid of the snapd then it will not be present which causes a failure. Solution : Adding a EXPECT_WITHIN which waits to get the pid until certain time period. Change-Id: If075860173a996f9eee13b346e939686b94ec3f6 BUG: 1145450 Signed-off-by: Sachin Pandit <spandit@redhat.com> Reviewed-on: http://review.gluster.org/8814 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'tests/bugs')
-rw-r--r--tests/bugs/bug-1109770.t8
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/bugs/bug-1109770.t b/tests/bugs/bug-1109770.t
index c9490a63654..03b929defda 100644
--- a/tests/bugs/bug-1109770.t
+++ b/tests/bugs/bug-1109770.t
@@ -44,9 +44,7 @@ TEST $CLI snapshot create snap4 $V0;
TEST $CLI volume set $V0 features.uss enable;
-SNAPD_PID=$(ps auxww | grep snapd | grep -v grep | awk '{print $2}');
-
-TEST [ $SNAPD_PID -gt 0 ];
+EXPECT_WITHIN $PROCESS_UP_TIMEOUT 'Y' check_if_snapd_exist
TEST $CLI volume set $V0 features.uss disable;
@@ -56,9 +54,7 @@ TEST ! [ $SNAPD_PID -gt 0 ];
TEST $CLI volume set $V0 features.uss enable;
-SNAPD_PID=$(ps auxww | grep snapd | grep -v grep | awk '{print $2}');
-
-TEST [ $SNAPD_PID -gt 0 ];
+EXPECT_WITHIN $PROCESS_UP_TIMEOUT 'Y' check_if_snapd_exist
TEST $CLI volume stop $V0;