diff options
author | João Barbosa <joao.paulo.barbosa@gmail.com> | 2018-10-19 23:10:49 +0100 |
---|---|---|
committer | João Barbosa <joao.paulo.barbosa@gmail.com> | 2018-12-06 11:45:18 +0000 |
commit | dcb032dcdf8e8300a84ae8ec6cfde0da5381f56f (patch) | |
tree | afb2505a7f514b113e46fcf9dd16d62e26913096 /test | |
parent | 75b5d8c4ead9c41f08fe53f9fffd3ffc984d6684 (diff) | |
download | bitcoin-dcb032dcdf8e8300a84ae8ec6cfde0da5381f56f.tar.xz |
qa: Ensure wallet unload during walletpassphrase timeout
0.17 branch doesn't include #12493 which changed encryptwallet behavior. For that
reason the test is adjusted.
Github-Pull: #14453
Rebased-From: 8907df9
Diffstat (limited to 'test')
-rwxr-xr-x | test/functional/wallet_multiwallet.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/functional/wallet_multiwallet.py b/test/functional/wallet_multiwallet.py index 435821ec48..f53172639c 100755 --- a/test/functional/wallet_multiwallet.py +++ b/test/functional/wallet_multiwallet.py @@ -8,6 +8,7 @@ Verify that a bitcoind node can load multiple wallet files """ import os import shutil +import time from test_framework.test_framework import BitcoinTestFramework from test_framework.test_node import ErrorMatch @@ -262,7 +263,15 @@ class MultiWalletTest(BitcoinTestFramework): assert 'w1' not in self.nodes[0].listwallets() # Successfully unload the wallet referenced by the request endpoint + # Also ensure unload works during walletpassphrase timeout + wallets = node.listwallets() + w2.encryptwallet('test') + self.restart_node(0, ['-wallet={}'.format(wallet) for wallet in wallets]) + w1 = node.get_wallet_rpc(wallet_names[0]) + w2 = node.get_wallet_rpc(wallet_names[1]) + w2.walletpassphrase('test', 1) w2.unloadwallet() + time.sleep(1.1) assert 'w2' not in self.nodes[0].listwallets() # Successfully unload all wallets |