diff options
author | MarcoFalke <falke.marco@gmail.com> | 2018-12-21 20:19:55 +0100 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2018-12-21 20:19:57 +0100 |
commit | cc7ad2f3d9fdd02a33367967685c1d67d93464e1 (patch) | |
tree | 28e09259b05498691466dc40c01d4e61ecfca748 | |
parent | feda41e0a7c4440d398516850f9cbd4c4f3192dd (diff) | |
parent | fabcd645b962ca5cad5a09a3d0d2eb9f006e9e8d (diff) |
Merge #15013: test: Avoid race in p2p_timeouts
fabcd645b9 test: Avoid racy test p2p_timeouts (MarcoFalke)
Pull request description:
Avoid filesystem/network racyness by sleeping another second. The alternative would be to poll the `debug.log`, but that seems overkill to avoid a sleep in a test that already requires them.
Tree-SHA512: 32de75ecba38426323158fda241e37ffae73806d8c0e60b7ad73fb917e9cd25a3e5f0722cbc6f2f7a5b86501221c317783266bc2e3b4697fb120f05898ccc12d
-rwxr-xr-x | test/functional/p2p_timeouts.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/functional/p2p_timeouts.py b/test/functional/p2p_timeouts.py index ffed853033..02ceec3dc1 100755 --- a/test/functional/p2p_timeouts.py +++ b/test/functional/p2p_timeouts.py @@ -72,7 +72,11 @@ class TimeoutsTest(BitcoinTestFramework): ] with self.nodes[0].assert_debug_log(expected_msgs=expected_timeout_logs): - sleep(2) + sleep(3) + # By now, we waited a total of 5 seconds. Off-by-two for two + # reasons: + # * The internal precision is one second + # * Account for network delay assert not no_verack_node.is_connected assert not no_version_node.is_connected assert not no_send_node.is_connected |