diff options
author | Martin Zumsande <mzumsande@gmail.com> | 2021-06-04 21:37:24 +0200 |
---|---|---|
committer | Martin Zumsande <mzumsande@gmail.com> | 2021-06-04 22:42:04 +0200 |
commit | ca3a77068b8c9c6107d078ea083f4ab7c0010548 (patch) | |
tree | 9c7e9de8a01d17ef7ec4c99e996b347e5abb03ea | |
parent | 346e52afd6d5e317c96fc506bb54cde13e87c8b2 (diff) |
test: Fix p2p_leak.py intermittent failure by lowering timeout
-rwxr-xr-x | test/functional/p2p_leak.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/functional/p2p_leak.py b/test/functional/p2p_leak.py index 71d5ca92b3..f1538e8ac7 100755 --- a/test/functional/p2p_leak.py +++ b/test/functional/p2p_leak.py @@ -29,6 +29,8 @@ from test_framework.util import ( assert_greater_than_or_equal, ) +PEER_TIMEOUT = 3 + class LazyPeer(P2PInterface): def __init__(self): @@ -98,7 +100,7 @@ class P2PVersionStore(P2PInterface): class P2PLeakTest(BitcoinTestFramework): def set_test_params(self): self.num_nodes = 1 - self.extra_args = [['-peertimeout=4']] + self.extra_args = [[f"-peertimeout={PEER_TIMEOUT}"]] def create_old_version(self, nversion): old_version_msg = msg_version() @@ -134,7 +136,7 @@ class P2PLeakTest(BitcoinTestFramework): self.nodes[0].generate(nblocks=1) # Give the node enough time to possibly leak out a message - time.sleep(5) + time.sleep(PEER_TIMEOUT + 2) # Make sure only expected messages came in assert not no_version_idle_peer.unexpected_msg |