diff --git a/src/DIRAC/FrameworkSystem/private/standardLogging/test/Test_Logging_Backends.py b/src/DIRAC/FrameworkSystem/private/standardLogging/test/Test_Logging_Backends.py index 2554867cb56..11cf31dbe75 100644 --- a/src/DIRAC/FrameworkSystem/private/standardLogging/test/Test_Logging_Backends.py +++ b/src/DIRAC/FrameworkSystem/private/standardLogging/test/Test_Logging_Backends.py @@ -2,6 +2,7 @@ Test backend attachment """ import pytest +from pathlib import Path from DIRAC.FrameworkSystem.private.standardLogging.test.TestLogUtilities import gLogger, gLoggerReset, cleaningLog @@ -146,3 +147,11 @@ def test_registerBackendgLogger(backends): for backend, params in backends.items(): content = params["extractBackendContent"](params["backendOptions"]) assert content == params["backendContent"] + + # Clean up backend temp output files + for params in backends.values(): + fName = params.get("backendOptions", {}).get("FileName", None) + if fName: + fPath = Path(fName) + if fPath.exists(): + fPath.unlink() diff --git a/src/DIRAC/WorkloadManagementSystem/JobWrapper/test/Test_JobWrapper.py b/src/DIRAC/WorkloadManagementSystem/JobWrapper/test/Test_JobWrapper.py index b9893279eb7..db35b062666 100644 --- a/src/DIRAC/WorkloadManagementSystem/JobWrapper/test/Test_JobWrapper.py +++ b/src/DIRAC/WorkloadManagementSystem/JobWrapper/test/Test_JobWrapper.py @@ -639,6 +639,8 @@ def test_execute(mocker, executable, args, src, expectedResult): if os.path.exists("std.out"): os.remove("std.out") + if os.path.exists("DISABLE_WATCHDOG_CPU_WALLCLOCK_CHECK"): + os.remove("DISABLE_WATCHDOG_CPU_WALLCLOCK_CHECK") # -------------------------------------------------------------------------------------------------