wait for the nodes to fully stop
Ideally, we'd fix this in IPTB but I'm tired of this bug and this is the easy fix. fixes #5272 License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
Steven Allen committed
Jul 30, 2018 at 11:57 UTC
abad8ca76ea2a3ff57cb0c90c0393593e37c15b1
4 files changed
+10
-3
test/sharness/lib/iptb-lib.sh
+6
@@ -56,3 +56,9 @@ startup_cluster() {
56
'
57
done
58
}
59
+
60
+iptb_wait_stop() {
61
+ while ! iptb for-each sh -c '! { test -e "$IPFS_PATH/repo.lock" && fuser -f "$IPFS_PATH/repo.lock" >/dev/null; }'; do
62
+ go-sleep 10ms
63
+ done
64
+}
test/sharness/t0125-twonode.sh
+1
-1
@@ -81,7 +81,7 @@ run_advanced_test() {
81
'
82
83
test_expect_success "shut down nodes" '
84
- iptb stop
84
+ iptb stop && iptb_wait_stop
85
'
86
}
87
test/sharness/t0130-multinode.sh
+2
-2
@@ -67,7 +67,7 @@ run_basic_test() {
67
run_single_file_test
68
69
test_expect_success "shut down nodes" '
70
- iptb stop
70
+ iptb stop && iptb_wait_stop
71
'
72
}
73
@@ -79,7 +79,7 @@ run_advanced_test() {
79
run_random_dir_test
80
81
test_expect_success "shut down nodes" '
82
- iptb stop ||
82
+ iptb stop && iptb_wait_stop ||
83
test_fsh tail -n +1 .iptb/*/daemon.std*
84
'
85
}
test/sharness/t0182-circuit-relay.sh
+1
@@ -21,6 +21,7 @@ test_expect_success 'configure EnableRelayHop in relay node' '
21
22
test_expect_success 'restart nodes' '
23
iptb stop &&
24
+ iptb_wait_stop &&
25
iptb start --args --routing=none
26
'
27