]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Tear down module logger handler in system tests
authorTom Krizek <tkrizek@isc.org>
Tue, 9 May 2023 12:20:02 +0000 (14:20 +0200)
committerTom Krizek <tkrizek@isc.org>
Mon, 22 May 2023 12:11:41 +0000 (14:11 +0200)
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.

bin/tests/system/conftest.py

index 83a01305116ed818262bf592ffc45ac55a81850e..efcc2f51ff3bab4f7d09ecf0b351e0996d05a8e8 100644 (file)
@@ -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