diff options
author | Ben Woosley <ben.woosley@gmail.com> | 2018-02-26 14:04:41 -0800 |
---|---|---|
committer | Ben Woosley <ben.woosley@gmail.com> | 2018-03-15 23:43:53 -0700 |
commit | 81b0822772169cb697b5994f49398e619d61a12d (patch) | |
tree | 5fa33497ba61f9ab4f14be747aed72225149966d /test/functional/wallet_basic.py | |
parent | 7be9a9a570c1140048f8781ced1111e1d930e517 (diff) |
test: Use wait_until in tests where time was used for polling
Diffstat (limited to 'test/functional/wallet_basic.py')
-rwxr-xr-x | test/functional/wallet_basic.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/wallet_basic.py b/test/functional/wallet_basic.py index f686cb6ea5..dcd6c54d97 100755 --- a/test/functional/wallet_basic.py +++ b/test/functional/wallet_basic.py @@ -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 |