Skip to content

Commit 8df48b3

Browse files
author
MarcoFalke
committed
Merge #11308: [qa] zapwallettxes: Wait up to 3s for mempool reload
fadd0c1 [qa] zapwallettxes: Wait up to 3s for mempool reload (MarcoFalke) Pull request description: There had been intermittent test failures on zapwallettxes, as no time was allotted to reload the mempool. Tree-SHA512: 993254d2aaca6ea42fceefffed0cf90bdda91c64150179ef2a11337c3fe2cc6bf42b83ea9d9a1a575204fbde2676d7203443b00d053e8c2ed43e017c09d3ab11
2 parents 96ac26e + fadd0c1 commit 8df48b3

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

test/functional/zapwallettxes.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@
1515
been zapped.
1616
"""
1717
from test_framework.test_framework import BitcoinTestFramework
18-
from test_framework.util import (assert_equal,
19-
assert_raises_jsonrpc,
20-
)
18+
from test_framework.util import (
19+
assert_equal,
20+
assert_raises_jsonrpc,
21+
wait_until,
22+
)
2123

2224
class ZapWalletTXesTest (BitcoinTestFramework):
2325
def set_test_params(self):
@@ -56,6 +58,8 @@ def run_test(self):
5658
self.stop_node(0)
5759
self.start_node(0, ["-persistmempool=1", "-zapwallettxes=2"])
5860

61+
wait_until(lambda: self.nodes[0].getmempoolinfo()['size'] == 1, timeout=3)
62+
5963
assert_equal(self.nodes[0].gettransaction(txid1)['txid'], txid1)
6064
assert_equal(self.nodes[0].gettransaction(txid2)['txid'], txid2)
6165

0 commit comments

Comments
 (0)