mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 20:03:34 -03:00
Merge #11308: [qa] zapwallettxes: Wait up to 3s for mempool reload
fadd0c16b
[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
This commit is contained in:
commit
8df48b36ed
1 changed files with 7 additions and 3 deletions
|
@ -15,8 +15,10 @@
|
||||||
been zapped.
|
been zapped.
|
||||||
"""
|
"""
|
||||||
from test_framework.test_framework import BitcoinTestFramework
|
from test_framework.test_framework import BitcoinTestFramework
|
||||||
from test_framework.util import (assert_equal,
|
from test_framework.util import (
|
||||||
|
assert_equal,
|
||||||
assert_raises_jsonrpc,
|
assert_raises_jsonrpc,
|
||||||
|
wait_until,
|
||||||
)
|
)
|
||||||
|
|
||||||
class ZapWalletTXesTest (BitcoinTestFramework):
|
class ZapWalletTXesTest (BitcoinTestFramework):
|
||||||
|
@ -56,6 +58,8 @@ class ZapWalletTXesTest (BitcoinTestFramework):
|
||||||
self.stop_node(0)
|
self.stop_node(0)
|
||||||
self.start_node(0, ["-persistmempool=1", "-zapwallettxes=2"])
|
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(txid1)['txid'], txid1)
|
||||||
assert_equal(self.nodes[0].gettransaction(txid2)['txid'], txid2)
|
assert_equal(self.nodes[0].gettransaction(txid2)['txid'], txid2)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue