Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_asyncio.test_waitfor: test_wait_for_timeout_less_then_0_or_0_coroutine_do_not_started() failed on GHA Windows x64 #109878

Closed
vstinner opened this issue Sep 26, 2023 · 2 comments
Labels
tests Tests in the Lib/test dir topic-asyncio

Comments

@vstinner
Copy link
Member

GHA Windows x64:

FAIL: test_wait_for_timeout_less_then_0_or_0_coroutine_do_not_started (test.test_asyncio.test_waitfor.AsyncioWaitForTest.test_wait_for_timeout_less_then_0_or_0_coroutine_do_not_started)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\a\cpython\cpython\Lib\unittest\async_case.py", line 90, in _callTestMethod
    if self._callMaybeAsync(method) is not None:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\a\cpython\cpython\Lib\unittest\async_case.py", line 112, in _callMaybeAsync
    return self._asyncioRunner.run(
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\a\cpython\cpython\Lib\asyncio\runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\a\cpython\cpython\Lib\asyncio\base_events.py", line 664, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "D:\a\cpython\cpython\Lib\test\test_asyncio\test_waitfor.py", line 92, in test_wait_for_timeout_less_then_0_or_0_coroutine_do_not_started
    self.assertLess(t1 - t0, 0.1)
AssertionError: 0.1879999999998745 not less than 0.1

build: https://github.com/python/cpython/actions/runs/6306288599/job/17121189775?pr=109871

@vstinner
Copy link
Member Author

See also issue gh-110088.

vstinner added a commit to vstinner/cpython that referenced this issue Sep 29, 2023
Don't measure CI performance: don't measure maximum duration. Only
measure the minimum duration when a task has a timeout or delay.

Add CLOCK_RES to test_asyncio.utils.
vstinner added a commit to vstinner/cpython that referenced this issue Sep 29, 2023
Fix test_asyncio timeout: 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.
vstinner added a commit to vstinner/cpython that referenced this issue Sep 29, 2023
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.
vstinner added a commit that referenced this issue Sep 29, 2023
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.
vstinner added a commit to vstinner/cpython that referenced this issue Sep 29, 2023
…10092)

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 db0a258)
@vstinner
Copy link
Member Author

Fixed by PR gh-110092.

@github-project-automation github-project-automation bot moved this from Todo to Done in asyncio Sep 29, 2023
vstinner added a commit that referenced this issue Sep 29, 2023
…0099)

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 db0a258)
vstinner added a commit to vstinner/cpython that referenced this issue Oct 2, 2023
…10092)

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 db0a258)
vstinner added a commit that referenced this issue Oct 2, 2023
…0098)

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 db0a258)
Glyphack pushed a commit to Glyphack/cpython that referenced this issue Sep 2, 2024
…10092)

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir topic-asyncio
Projects
Status: Done
Development

No branches or pull requests

1 participant