Skip to content

Commit fad441f

Browse files
author
MarcoFalke
committed
test: Treat leftover process as error
Printing to stderr instead of stdout makes the test_runner.py fail on leftover processes. This is desired and fine, because a leftover process should only happen on a test failure anyway.
1 parent 433412f commit fad441f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/functional/test_framework/test_node.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import urllib.parse
2121
import collections
2222
import shlex
23+
import sys
2324
from pathlib import Path
2425

2526
from .authproxy import (
@@ -204,7 +205,7 @@ def __del__(self):
204205
# Should only happen on test failure
205206
# Avoid using logger, as that may have already been shutdown when
206207
# this destructor is called.
207-
print(self._node_msg("Cleaning up leftover process"))
208+
print(self._node_msg("Cleaning up leftover process"), file=sys.stderr)
208209
self.process.kill()
209210

210211
def __getattr__(self, name):

0 commit comments

Comments
 (0)