Skip to content

test_shielded_cancel_sleep_time is unstable on slow build machines and slow platforms (e.g., ppc64le) #1263

Description

@mcepl

Things to check first

  • I have searched the existing issues and didn't find my bug already reported there

  • I have checked that my bug is still present in the latest release

AnyIO version

4.14.2

Python version

3.14.6

What happened?

When packaging for openSUSE/Factory I got this persistent failure of test_shielded_cancel_sleep_time:

___________________ test_shielded_cancel_sleep_time[asyncio] ___________________
[  554s]   + Exception Group Traceback (most recent call last):
[  554s]   |   File "/home/abuild/rpmbuild/BUILD/python-anyio-test-4.14.2-build/anyio-4.14.2/tests/test_taskgroups.py", line 1450, in test_shielded_cancel_sleep_time
[  554s]   |     async with create_task_group() as tg:
[  554s]   |                ~~~~~~~~~~~~~~~~~^^
[  554s]   |   File "/usr/lib/python3.13/site-packages/anyio/_backends/_asyncio.py", line 815, in __aexit__
[  554s]   |     raise BaseExceptionGroup(
[  554s]   |         "unhandled errors in a TaskGroup", self._exceptions
[  554s]   |     ) from None
[  554s]   | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
[  554s]   +-+---------------- 1 ----------------
[  554s]     | Traceback (most recent call last):
[  554s]     |   File "/home/abuild/rpmbuild/BUILD/python-anyio-test-4.14.2-build/anyio-4.14.2/tests/test_taskgroups.py", line 1458, in test_shielded_cancel_sleep_time
[  554s]     |     assert (time.process_time() - process_time) < hang_time
[  554s]     | AssertionError: assert (183.655833728 - 183.448973366) < 0.2
[  554s]     |  +  where 183.655833728 = <built-in function process_time>()
[  554s]     |  +    where <built-in function process_time> = time.process_time
[  554s]     +------------------------------------

How can we reproduce the bug?

Running the test suite on overloaded build system (OpenSUSE OpenBuild system in my case) with slow processor (ppc64le in my case)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions