diff options
author | Seleme Topuz <seleme94@hotmail.com> | 2020-08-17 17:50:47 +0200 |
---|---|---|
committer | Seleme Topuz <seleme94@hotmail.com> | 2020-08-26 18:01:59 +0200 |
commit | 1343c86c7cc1fc896696b3ed87c12039e4ef3a0c (patch) | |
tree | 0e98164b74d0549a90de162226c36b677b7e8846 /test/functional/rpc_net.py | |
parent | 93ab136a33e46080c8aa02d59fb7c2a8d03a3387 (diff) |
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
Diffstat (limited to 'test/functional/rpc_net.py')
-rwxr-xr-x | test/functional/rpc_net.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/test/functional/rpc_net.py b/test/functional/rpc_net.py index d4cfb48881..506c77c567 100755 --- a/test/functional/rpc_net.py +++ b/test/functional/rpc_net.py @@ -26,7 +26,6 @@ from test_framework.util import ( assert_raises_rpc_error, connect_nodes, p2p_port, - wait_until, ) @@ -93,8 +92,8 @@ class NetTest(BitcoinTestFramework): # the bytes sent/received should change # note ping and pong are 32 bytes each self.nodes[0].ping() - wait_until(lambda: (self.nodes[0].getnettotals()['totalbytessent'] >= net_totals_after['totalbytessent'] + 32 * 2), timeout=1) - wait_until(lambda: (self.nodes[0].getnettotals()['totalbytesrecv'] >= net_totals_after['totalbytesrecv'] + 32 * 2), timeout=1) + self.wait_until(lambda: (self.nodes[0].getnettotals()['totalbytessent'] >= net_totals_after['totalbytessent'] + 32 * 2), timeout=1) + self.wait_until(lambda: (self.nodes[0].getnettotals()['totalbytesrecv'] >= net_totals_after['totalbytesrecv'] + 32 * 2), timeout=1) peer_info_after_ping = self.nodes[0].getpeerinfo() for before, after in zip(peer_info, peer_info_after_ping): @@ -110,7 +109,7 @@ class NetTest(BitcoinTestFramework): self.nodes[0].setnetworkactive(state=False) assert_equal(self.nodes[0].getnetworkinfo()['networkactive'], False) # Wait a bit for all sockets to close - wait_until(lambda: self.nodes[0].getnetworkinfo()['connections'] == 0, timeout=3) + self.wait_until(lambda: self.nodes[0].getnetworkinfo()['connections'] == 0, timeout=3) with self.nodes[0].assert_debug_log(expected_msgs=['SetNetworkActive: true\n']): self.nodes[0].setnetworkactive(state=True) |