diff options
author | MacroFake <falke.marco@gmail.com> | 2022-08-24 12:48:24 +0200 |
---|---|---|
committer | MacroFake <falke.marco@gmail.com> | 2022-08-24 12:51:11 +0200 |
commit | fa2aae597c42b4f74460c58f35e7e1ace8a82796 (patch) | |
tree | 25966ef5fc16c04fbffebe069d4c9f8664b475c7 /test/functional | |
parent | c89fabff3d17f23098d70c925fbdc98aca79fec6 (diff) |
test: Fix intermittent issue in p2p_leak.py
Diffstat (limited to 'test/functional')
-rwxr-xr-x | test/functional/p2p_leak.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/functional/p2p_leak.py b/test/functional/p2p_leak.py index af8e45d578..936c22197c 100755 --- a/test/functional/p2p_leak.py +++ b/test/functional/p2p_leak.py @@ -138,6 +138,9 @@ class P2PLeakTest(BitcoinTestFramework): # Give the node enough time to possibly leak out a message time.sleep(PEER_TIMEOUT + 2) + self.log.info("Connect peer to ensure the net thread runs the disconnect logic at least once") + self.nodes[0].add_p2p_connection(P2PInterface()) + # Make sure only expected messages came in assert not no_version_idle_peer.unexpected_msg assert not no_version_idle_peer.got_wtxidrelay @@ -169,7 +172,7 @@ class P2PLeakTest(BitcoinTestFramework): self.log.info('Check that old peers are disconnected') p2p_old_peer = self.nodes[0].add_p2p_connection(P2PInterface(), send_version=False, wait_for_verack=False) - with self.nodes[0].assert_debug_log(['peer=4 using obsolete version 31799; disconnecting']): + with self.nodes[0].assert_debug_log(["using obsolete version 31799; disconnecting"]): p2p_old_peer.send_message(self.create_old_version(31799)) p2p_old_peer.wait_for_disconnect() |