0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-03-05 14:06:27 -05:00

test: Fix intermittent issue in rpc_net.py

This commit is contained in:
MarcoFalke 2022-12-03 17:43:14 +01:00
parent cac29f5cd6
commit fadf7b8fef
No known key found for this signature in database
GPG key ID: CE2B75697E69A548

View file

@ -185,7 +185,8 @@ class NetTest(BitcoinTestFramework):
self.nodes[0].setnetworkactive(state=False) self.nodes[0].setnetworkactive(state=False)
assert_equal(self.nodes[0].getnetworkinfo()['networkactive'], False) assert_equal(self.nodes[0].getnetworkinfo()['networkactive'], False)
# Wait a bit for all sockets to close # Wait a bit for all sockets to close
self.wait_until(lambda: self.nodes[0].getnetworkinfo()['connections'] == 0, timeout=3) for n in self.nodes:
self.wait_until(lambda: n.getnetworkinfo()['connections'] == 0, timeout=3)
with self.nodes[0].assert_debug_log(expected_msgs=['SetNetworkActive: true\n']): with self.nodes[0].assert_debug_log(expected_msgs=['SetNetworkActive: true\n']):
self.nodes[0].setnetworkactive(state=True) self.nodes[0].setnetworkactive(state=True)