Skip to content

Commit 1df3c67

Browse files
codablockUdjinM6
authored andcommitted
A few fixes for integration tests (#3263)
* Wait a little bit longer in wallet-encryption.py The timed wallet locking is happening by an asynchronous task internally, which means that it might need a little bit longer then the specified timeout. * Add workaround for p2p-versionbits-warnings.py until we backport bitcoin#12264
1 parent 6e50a7b commit 1df3c67

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

test/functional/p2p-versionbits-warning.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@ def run_test(self):
109109
pass
110110
self.start_nodes()
111111

112+
# TODO this is a workaround. We have to wait for IBD to finish before we generate a block, as otherwise there
113+
# won't be any warning generated. This workaround must be removed when we backport https://github.com/bitcoin/bitcoin/pull/12264
114+
self.nodes[0].generate(1)
115+
time.sleep(5)
116+
112117
# Connecting one block should be enough to generate an error.
113118
self.nodes[0].generate(1)
114119
assert(WARN_UNKNOWN_RULES_ACTIVE in self.nodes[0].getinfo()["errors"])

test/functional/wallet-encryption.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def run_test(self):
3939
assert_equal(privkey, self.nodes[0].dumpprivkey(address))
4040

4141
# Check that the timeout is right
42-
time.sleep(2)
42+
time.sleep(4) # Wait a little bit longer to make sure wallet gets locked
4343
assert_raises_rpc_error(-13, "Please enter the wallet passphrase with walletpassphrase first", self.nodes[0].dumpprivkey, address)
4444

4545
# Test wrong passphrase

0 commit comments

Comments
 (0)