aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2017-09-12 17:20:26 +0200
committerMarcoFalke <falke.marco@gmail.com>2017-09-12 23:33:08 +0200
commitfadd0c16b6bd62e9d663d906755320ae089e02d3 (patch)
treeb7880e425942220abb359db4a4db42f33aba56e5 /test
parentcce94c518a46b7b0006f984bbe4d69e8749182d2 (diff)
[qa] zapwallettxes: Wait up to 3s for mempool reload
Diffstat (limited to 'test')
-rwxr-xr-xtest/functional/zapwallettxes.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/functional/zapwallettxes.py b/test/functional/zapwallettxes.py
index c001517a6d..83b11035c8 100755
--- a/test/functional/zapwallettxes.py
+++ b/test/functional/zapwallettxes.py
@@ -15,9 +15,11 @@
been zapped.
"""
from test_framework.test_framework import BitcoinTestFramework
-from test_framework.util import (assert_equal,
- assert_raises_jsonrpc,
- )
+from test_framework.util import (
+ assert_equal,
+ assert_raises_jsonrpc,
+ wait_until,
+)
class ZapWalletTXesTest (BitcoinTestFramework):
def set_test_params(self):
@@ -56,6 +58,8 @@ class ZapWalletTXesTest (BitcoinTestFramework):
self.stop_node(0)
self.start_node(0, ["-persistmempool=1", "-zapwallettxes=2"])
+ wait_until(lambda: self.nodes[0].getmempoolinfo()['size'] == 1, timeout=3)
+
assert_equal(self.nodes[0].gettransaction(txid1)['txid'], txid1)
assert_equal(self.nodes[0].gettransaction(txid2)['txid'], txid2)