test: Use wait_until in tests where time was used for polling
This commit is contained in:
parent
7be9a9a570
commit
81b0822772
5 changed files with 13 additions and 34 deletions
test/functional
|
@ -379,9 +379,9 @@ class WalletTest(BitcoinTestFramework):
|
|||
self.start_node(0, [m, "-limitancestorcount="+str(chainlimit)])
|
||||
self.start_node(1, [m, "-limitancestorcount="+str(chainlimit)])
|
||||
self.start_node(2, [m, "-limitancestorcount="+str(chainlimit)])
|
||||
while m == '-reindex' and [block_count] * 3 != [self.nodes[i].getblockcount() for i in range(3)]:
|
||||
if m == '-reindex':
|
||||
# reindex will leave rpc warm up "early"; Wait for it to finish
|
||||
time.sleep(0.1)
|
||||
wait_until(lambda: [block_count] * 3 == [self.nodes[i].getblockcount() for i in range(3)])
|
||||
assert_equal(balance_nodes, [self.nodes[i].getbalance() for i in range(3)])
|
||||
|
||||
# Exercise listsinceblock with the last two blocks
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue