diff options
author | MarcoFalke <falke.marco@gmail.com> | 2017-08-23 17:11:33 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2017-08-23 17:12:30 -0400 |
commit | 8858b6ddd3bce9daa08da6e05de3ca863a399c15 (patch) | |
tree | eeb5f3af4845e8815d800d64f225784b40015abb /test/functional/bipdersig-p2p.py | |
parent | 41496e20f36987d27bed6cb83c06a6a978bfdf42 (diff) | |
parent | 08ce33f8e95efa81b37ddc6b3350462c61bbfd51 (diff) | |
download | bitcoin-8858b6ddd3bce9daa08da6e05de3ca863a399c15.tar.xz |
Merge #11068: qa: Move wait_until to util
08ce33f8e qa: Move wait_until to util (MarcoFalke)
Pull request description:
This moves `wait_until` to `util.py` to make it generally available to python tests.
Also, `wait_until` now takes an optional lock that is acquired while testing the predicate.
Previously the lock was always acquired, even when it was not necessary, cf. `disconnect_ban.py`.
Tree-SHA512: 18e452a017a6566fa8ad09bde058e1b841e167039dc63299e70cfa7a6dcbc779581e60ca3e8eb2f1b610767d5208b9376c203eb11015b250fd0542b5eb4215a8
Diffstat (limited to 'test/functional/bipdersig-p2p.py')
-rwxr-xr-x | test/functional/bipdersig-p2p.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/bipdersig-p2p.py b/test/functional/bipdersig-p2p.py index 38a9009544..9775970893 100755 --- a/test/functional/bipdersig-p2p.py +++ b/test/functional/bipdersig-p2p.py @@ -98,7 +98,7 @@ class BIP66Test(BitcoinTestFramework): node0.send_and_ping(msg_block(block)) assert_equal(int(self.nodes[0].getbestblockhash(), 16), tip) - assert wait_until(lambda: "reject" in node0.last_message.keys()) + wait_until(lambda: "reject" in node0.last_message.keys(), lock=mininode_lock) with mininode_lock: assert_equal(node0.last_message["reject"].code, REJECT_OBSOLETE) assert_equal(node0.last_message["reject"].reason, b'bad-version(0x00000002)') @@ -128,7 +128,7 @@ class BIP66Test(BitcoinTestFramework): node0.send_and_ping(msg_block(block)) assert_equal(int(self.nodes[0].getbestblockhash(), 16), tip) - assert wait_until (lambda: "reject" in node0.last_message.keys()) + wait_until(lambda: "reject" in node0.last_message.keys(), lock=mininode_lock) with mininode_lock: # We can receive different reject messages depending on whether # bitcoind is running with multiple script check threads. If script |