mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-27 06:19:09 +01:00
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:
@@ -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