mirror of
https://github.com/python/cpython.git
synced 2025-08-15 22:30:42 +00:00
gh-110088, gh-109878: Fix test_asyncio timeouts (#110092)
Fix test_asyncio timeouts: don't measure the maximum duration, a test
should not measure a CI performance. Only measure the minimum
duration when a task has a timeout or delay. Add CLOCK_RES to
test_asyncio.utils.
(cherry picked from commit db0a258e79
)
This commit is contained in:
parent
c188a13c8e
commit
0745ab88e5
7 changed files with 19 additions and 54 deletions
|
@ -36,6 +36,12 @@ from test.support import socket_helper
|
|||
from test.support import threading_helper
|
||||
|
||||
|
||||
# Use the maximum known clock resolution (gh-75191, gh-110088): Windows
|
||||
# GetTickCount64() has a resolution of 15.6 ms. Use 20 ms to tolerate rounding
|
||||
# issues.
|
||||
CLOCK_RES = 0.020
|
||||
|
||||
|
||||
def data_file(filename):
|
||||
if hasattr(support, 'TEST_HOME_DIR'):
|
||||
fullname = os.path.join(support.TEST_HOME_DIR, filename)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue