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:
1 parent
93ab136a33
commit
1343c86c7c
26 files changed
+74
-92
No files matched your search
@@ -24,7 +24,6 @@ from test_framework.p2p import (
|
||||
from test_framework.test_framework import BitcoinTestFramework
|
||||
from test_framework.util import (
|
||||
assert_equal,
|
||||
wait_until,
|
||||
)
|
||||
|
||||
VALID_DATA_LIMIT = MAX_PROTOCOL_MESSAGE_LENGTH - 5 # Account for the 5-byte length prefix
|
||||
@@ -70,7 +69,7 @@ class InvalidMessagesTest(BitcoinTestFramework):
|
||||
before = int(self.nodes[0].getnettotals()['totalbytesrecv'])
|
||||
conn.send_raw_message(msg[:cut_pos])
|
||||
# Wait until node has processed the first half of the message
|
||||
wait_until(lambda: int(self.nodes[0].getnettotals()['totalbytesrecv']) != before)
|
||||
self.wait_until(lambda: int(self.nodes[0].getnettotals()['totalbytesrecv']) != before)
|
||||
middle = int(self.nodes[0].getnettotals()['totalbytesrecv'])
|
||||
# If this assert fails, we've hit an unlikely race
|
||||
# where the test framework sent a message in between the two halves
|
||||
|
||||
Reference in new issue
Block a user