Skip to content

Commit d387507

Browse files
committed
Merge #14465: tests: Stop node before removing the notification file
ca6d86c 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
2 parents 8eb2cd1 + ca6d86c commit d387507

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/functional/feature_notifications.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,13 @@ def run_test(self):
5151
# directory content should equal the generated transaction hashes
5252
txids_rpc = list(map(lambda t: t['txid'], self.nodes[1].listtransactions("*", block_count)))
5353
assert_equal(sorted(txids_rpc), sorted(os.listdir(self.walletnotify_dir)))
54+
self.stop_node(1)
5455
for tx_file in os.listdir(self.walletnotify_dir):
5556
os.remove(os.path.join(self.walletnotify_dir, tx_file))
5657

5758
self.log.info("test -walletnotify after rescan")
5859
# restart node to rescan to force wallet notifications
59-
self.restart_node(1)
60+
self.start_node(1)
6061
connect_nodes_bi(self.nodes, 0, 1)
6162

6263
wait_until(lambda: len(os.listdir(self.walletnotify_dir)) == block_count, timeout=10)

0 commit comments

Comments
 (0)