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
This commit is contained in:
Seleme Topuz
2020-08-17 17:50:47 +02:00
parent 93ab136a33
commit 1343c86c7c
26 changed files with 74 additions and 92 deletions

View File

@ -19,7 +19,7 @@ from test_framework.blocktools import create_block, create_coinbase
from test_framework.messages import CTransaction, FromHex, msg_pong, msg_tx
from test_framework.p2p import P2PDataStore, P2PInterface
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import assert_equal, wait_until
from test_framework.util import assert_equal
class SlowP2PDataStore(P2PDataStore):
@ -92,7 +92,7 @@ class P2PEvict(BitcoinTestFramework):
for _ in range(8):
fastpeer = node.add_p2p_connection(P2PInterface())
current_peer += 1
wait_until(lambda: "ping" in fastpeer.last_message, timeout=10)
self.wait_until(lambda: "ping" in fastpeer.last_message, timeout=10)
# Make sure by asking the node what the actual min pings are
peerinfo = node.getpeerinfo()