Issue 17384: test_logging failures on Windows (original) (raw)

Created on 2013-03-08 05:02 by ezio.melotti, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (5)
msg183726 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2013-03-08 05:02
test_logging is failing on some buildbots: test_logging::AMD64 Windows7 SP1 3.x a0b750 42970c 9aafc0 test_logging::x86 Windows Server 2003 [SB] 3.x 9aafc0 6b69c1 c261b7 test_logging::x86 XP-4 3.x 6b69c1 c261b7 test_logging::x86 XP-5 3.x c261b7 7e8184 Only the Windows buildbots on 3.x seems to be affected. The failing tests were introduced in #11557. See e.g.: http://buildbot.python.org/builders/x86%20XP-5%203.x/builds/1946/steps/test/logs/stdio ====================================================================== ERROR: test_filemode (test.test_logging.BasicConfigTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\Buildslave\3.x.moore-windows\build\lib\unittest\case.py", line 385, in _executeTestPart function() File "D:\Buildslave\3.x.moore-windows\build\lib\unittest\case.py", line 484, in part = lambda: function(*args, **kwargs) PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'test.log' ====================================================================== ERROR: test_filename (test.test_logging.BasicConfigTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\Buildslave\3.x.moore-windows\build\lib\unittest\case.py", line 385, in _executeTestPart function() File "D:\Buildslave\3.x.moore-windows\build\lib\unittest\case.py", line 484, in part = lambda: function(*args, **kwargs) PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'test.log' ---------------------------------------------------------------------- Ran 145 tests in 7.234s FAILED (errors=2, skipped=2)
msg183731 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2013-03-08 09:43
I'm not sure it's related to #11557 - it's more likely to be my changes last week to fix #17313, where I changed those tests to add self.addCleanup(os.remove, 'test.log') There's also an addCleanup that closes the handler which opens the file, which should close the file, but it may be that the cleanup functions get executed out of order. I'll consolidate both operations into a single cleanup function.
msg183732 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-03-08 09:51
New changeset 85325bce9982 by Vinay Sajip in branch 'default': Issue #17384: Consolidated cleanup operations in tests. http://hg.python.org/cpython/rev/85325bce9982
msg183807 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2013-03-09 07:51
Closing, as the errors seem to have gone away after the cleanup update.
msg183837 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2013-03-09 18:31
Confirmed, thanks for fixing this!
History
Date User Action Args
2022-04-11 14:57:42 admin set github: 61586
2013-03-09 18:31:26 ezio.melotti set messages: + stage: needs patch -> resolved
2013-03-09 07:51:33 vinay.sajip set status: open -> closedresolution: fixedmessages: +
2013-03-08 09:51:31 python-dev set nosy: + python-devmessages: +
2013-03-08 09:43:48 vinay.sajip set messages: +
2013-03-08 05:03:08 ezio.melotti set type: enhancement -> behaviorcomponents: + Tests
2013-03-08 05:02:44 ezio.melotti create