aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJoão Barbosa <joao.paulo.barbosa@gmail.com>2019-02-04 18:50:21 +0000
committerJoão Barbosa <joao.paulo.barbosa@gmail.com>2019-02-04 18:50:21 +0000
commitd3bf3b930d34da7d121ae35b4fb75865ed73208c (patch)
treedbabb4d5cf1a884ecf13fadd7dcdea93b203335c /test
parent2f8b8f479bb43729ca2ff40929e8463347b0b7b4 (diff)
downloadbitcoin-d3bf3b930d34da7d121ae35b4fb75865ed73208c.tar.xz
qa: Test .walletlock file is closed
Diffstat (limited to 'test')
-rwxr-xr-xtest/functional/wallet_multiwallet.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/functional/wallet_multiwallet.py b/test/functional/wallet_multiwallet.py
index 8ab569a3c3..df778f57df 100755
--- a/test/functional/wallet_multiwallet.py
+++ b/test/functional/wallet_multiwallet.py
@@ -315,6 +315,14 @@ class MultiWalletTest(BitcoinTestFramework):
self.nodes[0].loadwallet(wallet_name)
assert_equal(rpc.getaddressinfo(addr)['ismine'], True)
+ # Test .walletlock file is closed
+ self.start_node(1)
+ wallet = os.path.join(self.options.tmpdir, 'my_wallet')
+ self.nodes[0].createwallet(wallet)
+ assert_raises_rpc_error(-4, "Error initializing wallet database environment", self.nodes[1].loadwallet, wallet)
+ self.nodes[0].unloadwallet(wallet)
+ self.nodes[1].loadwallet(wallet)
+
if __name__ == '__main__':
MultiWalletTest().main()