From 2eadeb27ed40d4dcb252a9d993d3946435f6e22e Mon Sep 17 00:00:00 2001 From: dexX7 Date: Mon, 20 Apr 2015 11:50:33 +0200 Subject: [PATCH] QA: stop nodes after RPC tests, even with --nocleanup `--nocleanup` should provide a way to preserve test data, but should not have an impact on whether nodes are to be stopped after the test execution. In particular, when currently running RPC tests with `--nocleanup`, then it may result in several active `bitcoind` processes, which are not terminated properly. --- qa/rpc-tests/test_framework.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qa/rpc-tests/test_framework.py b/qa/rpc-tests/test_framework.py index 4c8a11b82..8de7a4b5e 100755 --- a/qa/rpc-tests/test_framework.py +++ b/qa/rpc-tests/test_framework.py @@ -128,10 +128,12 @@ class BitcoinTestFramework(object): print("Unexpected exception caught during testing: "+str(e)) traceback.print_tb(sys.exc_info()[2]) + print("Stopping nodes") + stop_nodes(self.nodes) + wait_bitcoinds() + if not self.options.nocleanup: print("Cleaning up") - stop_nodes(self.nodes) - wait_bitcoinds() shutil.rmtree(self.options.tmpdir) if success: