1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-28 00:39:31 +08:00

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>
This commit is contained in:
Steven Allen
2018-07-30 11:57:27 -07:00
parent e25383e49e
commit abad8ca76e
4 changed files with 10 additions and 3 deletions

View File

@ -56,3 +56,9 @@ startup_cluster() {
'
done
}
iptb_wait_stop() {
while ! iptb for-each sh -c '! { test -e "$IPFS_PATH/repo.lock" && fuser -f "$IPFS_PATH/repo.lock" >/dev/null; }'; do
go-sleep 10ms
done
}

View File

@ -81,7 +81,7 @@ run_advanced_test() {
'
test_expect_success "shut down nodes" '
iptb stop
iptb stop && iptb_wait_stop
'
}

View File

@ -67,7 +67,7 @@ run_basic_test() {
run_single_file_test
test_expect_success "shut down nodes" '
iptb stop
iptb stop && iptb_wait_stop
'
}
@ -79,7 +79,7 @@ run_advanced_test() {
run_random_dir_test
test_expect_success "shut down nodes" '
iptb stop ||
iptb stop && iptb_wait_stop ||
test_fsh tail -n +1 .iptb/*/daemon.std*
'
}

View File

@ -21,6 +21,7 @@ test_expect_success 'configure EnableRelayHop in relay node' '
test_expect_success 'restart nodes' '
iptb stop &&
iptb_wait_stop &&
iptb start --args --routing=none
'