HomePhabricator

[backport#14465] tests: Stop node before removing the notification file

Description

[backport#14465] tests: Stop node before removing the notification file

Summary:
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

https://github.com/bitcoin/bitcoin/pull/14465/commits/ca6d86c3221fbeab63f451e1fb901a68d2c4a1aa


Backport of Core PR14465

Test Plan:

ninja
test_runner.py feature_notifications

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D7077

Details

Provenance
Pieter Wuille <pieter.wuille@gmail.com>Authored on Oct 19 2018, 05:52
majcostaCommitted on Jul 30 2020, 00:12
majcostaPushed on Jul 30 2020, 00:12
Reviewer
Restricted Project
Differential Revision
D7077: [backport#14465] tests: Stop node before removing the notification file
Parents
rABC97fe5d3a8660: Do not generate RPC doc index files multiple times
Branches
Unknown
Tags
Unknown