aboutsummaryrefslogtreecommitdiff
path: root/test/functional/p2p-leaktests.py
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2017-08-16 18:17:34 +0200
committerMarcoFalke <falke.marco@gmail.com>2017-08-17 15:17:09 +0200
commit08ce33f8e95efa81b37ddc6b3350462c61bbfd51 (patch)
tree6aba3f369154013dc943169a89320fb8364af1a6 /test/functional/p2p-leaktests.py
parent22e301a3d56dc9e6878380ee92c7d19ca43119d2 (diff)
qa: Move wait_until to util
Diffstat (limited to 'test/functional/p2p-leaktests.py')
-rwxr-xr-xtest/functional/p2p-leaktests.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/functional/p2p-leaktests.py b/test/functional/p2p-leaktests.py
index 5611c876ae..f0d4d9a8b8 100755
--- a/test/functional/p2p-leaktests.py
+++ b/test/functional/p2p-leaktests.py
@@ -119,11 +119,11 @@ class P2PLeakTest(BitcoinTestFramework):
NetworkThread().start() # Start up network handling in another thread
- assert wait_until(lambda: no_version_bannode.ever_connected, timeout=10)
- assert wait_until(lambda: no_version_idlenode.ever_connected, timeout=10)
- assert wait_until(lambda: no_verack_idlenode.version_received, timeout=10)
- assert wait_until(lambda: unsupported_service_bit5_node.ever_connected, timeout=10)
- assert wait_until(lambda: unsupported_service_bit7_node.ever_connected, timeout=10)
+ wait_until(lambda: no_version_bannode.ever_connected, timeout=10, lock=mininode_lock)
+ wait_until(lambda: no_version_idlenode.ever_connected, timeout=10, lock=mininode_lock)
+ wait_until(lambda: no_verack_idlenode.version_received, timeout=10, lock=mininode_lock)
+ wait_until(lambda: unsupported_service_bit5_node.ever_connected, timeout=10, lock=mininode_lock)
+ wait_until(lambda: unsupported_service_bit7_node.ever_connected, timeout=10, lock=mininode_lock)
# Mine a block and make sure that it's not sent to the connected nodes
self.nodes[0].generate(1)
@@ -158,8 +158,8 @@ class P2PLeakTest(BitcoinTestFramework):
allowed_service_bit5_node.add_connection(connections[5])
allowed_service_bit7_node.add_connection(connections[6])
- assert wait_until(lambda: allowed_service_bit5_node.message_count["verack"], timeout=10)
- assert wait_until(lambda: allowed_service_bit7_node.message_count["verack"], timeout=10)
+ wait_until(lambda: allowed_service_bit5_node.message_count["verack"], timeout=10, lock=mininode_lock)
+ wait_until(lambda: allowed_service_bit7_node.message_count["verack"], timeout=10, lock=mininode_lock)
if __name__ == '__main__':
P2PLeakTest().main()