aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2018-10-18 22:52:41 -0700
committerPieter Wuille <pieter.wuille@gmail.com>2018-10-18 22:52:49 -0700
commitd387507aeca652a5569825af65243536f2ce26ea (patch)
tree505815f8dfe3d547e7b83579d07c31236742ae89 /test
parent8eb2cd1ddaab6ec75b8ba02b353b260094798cd4 (diff)
parentca6d86c3221fbeab63f451e1fb901a68d2c4a1aa (diff)
downloadbitcoin-d387507aeca652a5569825af65243536f2ce26ea.tar.xz
Merge #14465: tests: Stop node before removing the notification file
ca6d86c322 tests: Stop node before removing the notification file (Chun Kuan Lee) Pull request description: Stop node before removing the notification file to make sure the command has been terminated. After then we could removing those files safely and do not receive any permission error. (See #14446) The permission error is Windows specific, documented in python doc: >On Windows, attempting to remove a file that is in use causes an exception to be raised See https://docs.python.org/3/library/os.html#os.remove Tree-SHA512: fbdabf3a9a838bb59ba207dd9e9fbdd87c702a99ad66bee0b2b1537f80f8630d22d9d5e9c4ded23a82a66bfc10989227fb024b27393425abe0e5a2ad4e4cbb82
Diffstat (limited to 'test')
-rwxr-xr-xtest/functional/feature_notifications.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/functional/feature_notifications.py b/test/functional/feature_notifications.py
index 90dc4c8e2b..d8083b2840 100755
--- a/test/functional/feature_notifications.py
+++ b/test/functional/feature_notifications.py
@@ -51,12 +51,13 @@ class NotificationsTest(BitcoinTestFramework):
# directory content should equal the generated transaction hashes
txids_rpc = list(map(lambda t: t['txid'], self.nodes[1].listtransactions("*", block_count)))
assert_equal(sorted(txids_rpc), sorted(os.listdir(self.walletnotify_dir)))
+ self.stop_node(1)
for tx_file in os.listdir(self.walletnotify_dir):
os.remove(os.path.join(self.walletnotify_dir, tx_file))
self.log.info("test -walletnotify after rescan")
# restart node to rescan to force wallet notifications
- self.restart_node(1)
+ self.start_node(1)
connect_nodes_bi(self.nodes, 0, 1)
wait_until(lambda: len(os.listdir(self.walletnotify_dir)) == block_count, timeout=10)