From 1343c86c7cc1fc896696b3ed87c12039e4ef3a0c Mon Sep 17 00:00:00 2001 From: Seleme Topuz Date: Mon, 17 Aug 2020 17:50:47 +0200 Subject: test: Update wait_until usage in tests not to use the one from utils Replace "wait_until()" usage from utils, with the ones from BitcoinTestFramework and P2PInterface. closes #19080 --- test/functional/feature_versionbits_warning.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'test/functional/feature_versionbits_warning.py') diff --git a/test/functional/feature_versionbits_warning.py b/test/functional/feature_versionbits_warning.py index 78c295b6e8..e045adac32 100755 --- a/test/functional/feature_versionbits_warning.py +++ b/test/functional/feature_versionbits_warning.py @@ -14,7 +14,6 @@ from test_framework.blocktools import create_block, create_coinbase from test_framework.messages import msg_block from test_framework.p2p import p2p_lock, P2PInterface from test_framework.test_framework import BitcoinTestFramework -from test_framework.util import wait_until VB_PERIOD = 144 # versionbits period length for regtest VB_THRESHOLD = 108 # versionbits activation threshold for regtest @@ -91,14 +90,14 @@ class VersionBitsWarningTest(BitcoinTestFramework): # Generating one block guarantees that we'll get out of IBD node.generatetoaddress(1, node_deterministic_address) - wait_until(lambda: not node.getblockchaininfo()['initialblockdownload'], timeout=10, lock=p2p_lock) + self.wait_until(lambda: not node.getblockchaininfo()['initialblockdownload'], timeout=10, lock=p2p_lock) # Generating one more block will be enough to generate an error. node.generatetoaddress(1, node_deterministic_address) # Check that get*info() shows the versionbits unknown rules warning assert WARN_UNKNOWN_RULES_ACTIVE in node.getmininginfo()["warnings"] assert WARN_UNKNOWN_RULES_ACTIVE in node.getnetworkinfo()["warnings"] # Check that the alert file shows the versionbits unknown rules warning - wait_until(lambda: self.versionbits_in_alert_file(), timeout=60) + self.wait_until(lambda: self.versionbits_in_alert_file()) if __name__ == '__main__': VersionBitsWarningTest().main() -- cgit v1.2.3