File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -236,13 +236,22 @@ test_launch_ipfs_daemon_and_mount() {
236
236
}
237
237
238
238
test_kill_repeat_10_sec () {
239
+ # try to shut down once + wait for graceful exit
240
+ kill $1
239
241
for i in 1 2 3 4 5 6 7 8 9 10
240
242
do
241
- kill $1
242
243
sleep 1
243
244
! kill -0 $1 2> /dev/null && return
244
245
done
245
- ! kill -0 $1 2> /dev/null
246
+
247
+ # if not, try once more, which will skip graceful exit
248
+ kill $1
249
+ sleep 1
250
+ ! kill -0 $1 2> /dev/null && return
251
+
252
+ # ok, no hope. kill it to prevent it messing with other tests
253
+ kill -9 $1 2> /dev/null
254
+ return 1
246
255
}
247
256
248
257
test_kill_ipfs_daemon () {
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ test_expect_success "'ipfs mount' fails when there is no mount dir" '
24
24
test_must_fail ipfs mount -f=not_ipfs -n=not_ipns >output 2>output.err
25
25
'
26
26
27
- test_expect_success " 'ipfs mount' output looks good" '
27
+ test_expect_failure " 'ipfs mount' output looks good" '
28
28
test_must_be_empty output &&
29
29
test_should_contain "not_ipns\|not_ipfs" output.err
30
30
'
You can’t perform that action at this time.
0 commit comments