You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order for BitcoinTestFramework to correctly restart after shutdown, the
previous logging handlers need to be removed, or else logging will continue in
the previous temp directory. "Flush" ensures buffers are emptied, and "close"
ensures file handler close logging file.
Copy file name to clipboardExpand all lines: test/functional/test_framework/test_framework.py
+12-1Lines changed: 12 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -266,7 +266,18 @@ def shutdown(self):
266
266
self.log.error("Test failed. Test logging available at %s/test_framework.log", self.options.tmpdir)
267
267
self.log.error("Hint: Call {} '{}' to consolidate all logs".format(os.path.normpath(os.path.dirname(os.path.realpath(__file__)) +"/../combine_logs.py"), self.options.tmpdir))
268
268
exit_code=TEST_EXIT_FAILED
269
-
logging.shutdown()
269
+
# Logging.shutdown will not remove stream- and filehandlers, so we must
270
+
# do it explicitly. Handlers are removed so the next test run can apply
0 commit comments