mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-18 22:35:39 +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:
@@ -5,7 +5,7 @@
|
||||
"""Test bitcoind shutdown."""
|
||||
|
||||
from test_framework.test_framework import BitcoinTestFramework
|
||||
from test_framework.util import assert_equal, get_rpc_proxy, wait_until
|
||||
from test_framework.util import assert_equal, get_rpc_proxy
|
||||
from threading import Thread
|
||||
|
||||
def test_long_call(node):
|
||||
@@ -25,7 +25,7 @@ class ShutdownTest(BitcoinTestFramework):
|
||||
node.getblockcount()
|
||||
Thread(target=test_long_call, args=(node,)).start()
|
||||
# Wait until the server is executing the above `waitfornewblock`.
|
||||
wait_until(lambda: len(self.nodes[0].getrpcinfo()['active_commands']) == 2)
|
||||
self.wait_until(lambda: len(self.nodes[0].getrpcinfo()['active_commands']) == 2)
|
||||
# Wait 1 second after requesting shutdown but not before the `stop` call
|
||||
# finishes. This is to ensure event loop waits for current connections
|
||||
# to close.
|
||||
|
||||
Reference in New Issue
Block a user