Closed
Description
Bug report
Seen in https://github.com/python/cpython/actions/runs/13606431591/job/38038447105?pr=130724 on both the default and free threading builds:
======================================================================
FAIL: test_wmi_query_error (test.test_wmi.WmiTests.test_wmi_query_error)
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\a\cpython\cpython\Lib\test\test_wmi.py", line 50, in test_wmi_query_error
self.fail("Expected OSError")
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
AssertionError: Expected OSError
----------------------------------------------------------------------
======================================================================
FAIL: test_wmi_query_repeated_error (test.test_wmi.WmiTests.test_wmi_query_repeated_error)
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\a\cpython\cpython\Lib\test\test_wmi.py", line 54, in test_wmi_query_repeated_error
self.test_wmi_query_error()
~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "D:\a\cpython\cpython\Lib\test\test_wmi.py", line 50, in test_wmi_query_error
self.fail("Expected OSError")
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
AssertionError: Expected OSError
----------------------------------------------------------------------
======================================================================
ERROR: test_wmi_query_repeated (test.test_wmi.WmiTests.test_wmi_query_repeated)
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\a\cpython\cpython\Lib\test\test_wmi.py", line 40, in test_wmi_query_repeated
self.test_wmi_query_os_version()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "D:\a\cpython\cpython\Lib\test\test_wmi.py", line 28, in test_wmi_query_os_version
r = wmi_exec_query("SELECT Version FROM Win32_OperatingSystem").split("\0")
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\a\cpython\cpython\Lib\test\test_wmi.py", line 23, in wmi_exec_query
return _wmi.exec_query(query)
~~~~~~~~~~~~~~~^^^^^^^
TimeoutError: [WinError 258] The wait operation timed out
----------------------------------------------------------------------
Ran 8 tests in 45.543s
FAILED (errors=1, skipped=1)
In these cases the tests succeeded when retried.
Linked PRs
- gh-130727: Retry test_wmi on TimeoutError #130832
- [3.13] gh-130727: Retry test_wmi on TimeoutError (GH-130832) #130839
- [3.12] gh-130727: Retry test_wmi on TimeoutError (GH-130832) #130840
- GH-130727: test_wmi_query_error test is flaky #134313
- [3.13] GH-130727: Avoid race condition in _wmimodule by copying shared data (GH-134313) #134396
- [3.14] GH-130727: Avoid race condition in _wmimodule by copying shared data (GH-134313) #134397