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:
@ -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
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ run_advanced_test() {
|
||||
'
|
||||
|
||||
test_expect_success "shut down nodes" '
|
||||
iptb stop
|
||||
iptb stop && iptb_wait_stop
|
||||
'
|
||||
}
|
||||
|
||||
|
@ -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*
|
||||
'
|
||||
}
|
||||
|
@ -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
|
||||
'
|
||||
|
||||
|
Reference in New Issue
Block a user