Unverified Commit 77052409 authored by Steven Allen's avatar Steven Allen Committed by GitHub

Merge pull request #5315 from ipfs/fix/5272

wait for the nodes to fully stop
parents c16a38e6 abad8ca7
......@@ -47,9 +47,9 @@
"version": "0.1.3"
},
{
"hash": "QmPCdWsL88nB7fzvhLRhBMo1QVLtt6Vm7ee7N9ZoUsqpPL",
"hash": "QmR6BuYN4nWLxm5E3WtwvSwRGR9ZHjrNPoqXYM63z98swp",
"name": "iptb",
"version": "1.3.3"
"version": "1.3.5"
},
{
"hash": "QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8",
......
......@@ -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
}
......@@ -13,7 +13,7 @@ test_init_ipfs
test_launch_ipfs_daemon
test_expect_success "shutdown succeeds" '
ipfs shutdown
ipfs shutdown || true # bug: https://github.com/ipfs/go-ipfs/issues/4055
'
test_expect_success "daemon no longer running" '
......@@ -27,7 +27,7 @@ test_expect_success "daemon no longer running" '
test_launch_ipfs_daemon --offline
test_expect_success "shutdown succeeds" '
ipfs shutdown
ipfs shutdown || true # bug: https://github.com/ipfs/go-ipfs/issues/4055
'
test_expect_success "daemon no longer running" '
......
......@@ -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*
'
}
......
......@@ -51,10 +51,6 @@ reprovide() {
'
}
test_expect_success 'stop peer 1' '
iptb stop 1
'
# Test 'all' strategy
init_strategy 'all'
......
......@@ -61,7 +61,7 @@ test_expect_success "start nodes" '
'
test_expect_success "try connecting node in public network with priv networks" '
iptb connect --timeout=2s [1-4] 0
test_must_fail iptb connect --timeout=2s [1-4] 0
'
test_expect_success "node 0 (public network) swarm is empty" '
......@@ -70,7 +70,7 @@ test_expect_success "node 0 (public network) swarm is empty" '
'
test_expect_success "try connecting nodes in different private networks" '
iptb connect 2 3
test_must_fail iptb connect 2 3
'
test_expect_success "node 3 (pnet 2) swarm is empty" '
......
......@@ -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
'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment