From: Tom Krizek Date: Tue, 9 May 2023 12:20:02 +0000 (+0200) Subject: Tear down module logger handler in system tests X-Git-Tag: v9.19.14~35^2~2 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=0f8a2b07a4bb235c1dd3aff4ad53ee8a083d67d0;p=thirdparty%2Fbind9.git Tear down module logger handler in system tests The module-level logger has a handler that writes into a temporary directory. Ensure the logging output is flushed and the handler is closed before attempting to remove this temporary directory. --- diff --git a/bin/tests/system/conftest.py b/bin/tests/system/conftest.py index 83a01305116..efcc2f51ff3 100644 --- a/bin/tests/system/conftest.py +++ b/bin/tests/system/conftest.py @@ -449,6 +449,8 @@ else: ) else: mlogger.debug("deleting temporary directory") + handler.flush() + handler.close() shutil.rmtree(testdir) def _run_script( # pylint: disable=too-many-arguments