diff options
| author | John Newbery <[email protected]> | 2017-04-25 10:11:31 -0400 |
|---|---|---|
| committer | Luke Dashjr <[email protected]> | 2017-06-05 22:56:22 +0000 |
| commit | ee1a60d15609930954b1b85da7f33774711123cd (patch) | |
| tree | b31233a1cf1d7fdc5a31ff81c77c3dd81ab01b41 /qa | |
| parent | [net] listbanned RPC and QT should show correct banned subnets (diff) | |
| download | discoin-ee1a60d15609930954b1b85da7f33774711123cd.tar.xz discoin-ee1a60d15609930954b1b85da7f33774711123cd.zip | |
[tests] update disconnect_ban.py test case to work with listbanned
Github-Pull: #10234
Rebased-From: d6732d832aa901e733e63799260d409821a2c37a
Diffstat (limited to 'qa')
| -rwxr-xr-x | qa/rpc-tests/nodehandling.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/qa/rpc-tests/nodehandling.py b/qa/rpc-tests/nodehandling.py index df6e2bc6a..61be27ae2 100755 --- a/qa/rpc-tests/nodehandling.py +++ b/qa/rpc-tests/nodehandling.py @@ -33,7 +33,7 @@ class NodeHandlingTest(BitcoinTestFramework): ########################### assert_equal(len(self.nodes[1].getpeerinfo()), 2) # node1 should have 2 connections to node0 at this point self.nodes[1].setban("127.0.0.1", "add") - wait_until(lambda: len(self.nodes[1].getpeerinfo()) == 0) + assert wait_until(lambda: len(self.nodes[1].getpeerinfo()) == 0, timeout=10) assert_equal(len(self.nodes[1].getpeerinfo()), 0) # all nodes must be disconnected at this point assert_equal(len(self.nodes[1].listbanned()), 1) self.nodes[1].clearbanned() @@ -60,7 +60,7 @@ class NodeHandlingTest(BitcoinTestFramework): self.nodes[1].setban("2001:4d48:ac57:400:cacf:e9ff:fe1d:9c63/19", "add", 1000) # ban for 1000 seconds listBeforeShutdown = self.nodes[1].listbanned() assert_equal("192.168.0.1/32", listBeforeShutdown[2]['address']) - wait_until(lambda: len(self.nodes[1].listbanned()) == 3) + assert wait_until(lambda: len(self.nodes[1].listbanned()) == 3, timeout=10) stop_node(self.nodes[1], 1) @@ -79,7 +79,7 @@ class NodeHandlingTest(BitcoinTestFramework): ########################### address1 = self.nodes[0].getpeerinfo()[0]['addr'] self.nodes[0].disconnectnode(address=address1) - wait_until(lambda: len(self.nodes[0].getpeerinfo()) == 1) + assert wait_until(lambda: len(self.nodes[0].getpeerinfo()) == 1, timeout=10) assert not [node for node in self.nodes[0].getpeerinfo() if node['addr'] == address1] connect_nodes_bi(self.nodes, 0, 1) # reconnect the node |