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.
This commit is contained in:
Victor Stinner 2023-09-29 13:49:30 +02:00 committed by GitHub
parent e27adc68cc
commit db0a258e79
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 19 additions and 54 deletions

View file

@ -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):
fullname = os.path.join(support.TEST_HOME_DIR, *filename)
if os.path.isfile(fullname):