summaryrefslogtreecommitdiffstats
path: root/tests/snapshot.rc
diff options
context:
space:
mode:
authorSachin Pandit <spandit@redhat.com>2014-09-23 08:44:19 +0530
committerVijay Bellur <vbellur@redhat.com>2014-09-23 09:03:54 -0700
commit29ac98bdc7a07611d3e32b2b00e27bb3a273117b (patch)
treeafcf333c3f082111d278ed6d3b1b27aa32f8ddb1 /tests/snapshot.rc
parent07235e99003693687e349f74d5627bd8c53ff1e0 (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: I5fdda9beecf867b7544f2e4b830f698ddf6e3bec BUG: 1145189 Signed-off-by: Sachin Pandit <spandit@redhat.com> Reviewed-on: http://review.gluster.org/8809 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'tests/snapshot.rc')
-rwxr-xr-xtests/snapshot.rc6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/snapshot.rc b/tests/snapshot.rc
index 408b5a72a0c..3bdb79b764b 100755
--- a/tests/snapshot.rc
+++ b/tests/snapshot.rc
@@ -384,3 +384,9 @@ function snap_config()
local var=$2
$cli_index snapshot config | grep "^$var" | sed 's/.*: //'
}
+
+function check_if_snapd_exist() {
+ local pid
+ pid=$(ps aux | grep "snapd" | grep -v grep | awk '{print $2}')
+ if [ -n "$pid" ]; then echo "Y"; else echo "N"; fi
+}