diff options
Diffstat (limited to 'tests/bugs/snapshot/bug-1111041.t')
-rwxr-xr-x | tests/bugs/snapshot/bug-1111041.t | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/bugs/snapshot/bug-1111041.t b/tests/bugs/snapshot/bug-1111041.t index f771d64f2a3..efda9688d8b 100755 --- a/tests/bugs/snapshot/bug-1111041.t +++ b/tests/bugs/snapshot/bug-1111041.t @@ -11,6 +11,10 @@ function is_snapd_running { $CLI volume status $1 | grep "Snapshot Daemon" | wc -l; } +function snapd_pid { + $CLI volume status $V0 | grep "Snapshot Daemon" | awk {'print $8'} +} + TEST glusterd; TEST pidof glusterd; @@ -25,14 +29,12 @@ TEST $CLI volume set $V0 features.uss enable; EXPECT "1" is_snapd_running $V0 -SNAPD_PID=$($CLI volume status $V0 | grep "Snapshot Daemon" | awk {'print $8'}); +SNAPD_PID=$(snapd_pid); TEST [ $SNAPD_PID -gt 0 ] kill -9 $SNAPD_PID -SNAPD_PID=$($CLI volume status $V0 | grep "Snapshot Daemon" | awk {'print $8'}); - -TEST [ $SNAPD_PID = 'N/A' ] +EXPECT_WITHIN $PROCESS_DOWN_TIMEOUT "^N/A$" snapd_pid cleanup ; |