Skip to content

[tests] asyncio: test_staggered_race_with_eager_tasks() fails randomly #127258

@vstinner

Description

@vstinner

AMD64 Windows11 Refleaks 3.x build: https://buildbot.python.org/#/builders/920/builds/1141

FAIL: test_staggered_race_with_eager_tasks (test.test_asyncio.test_eager_task_factory.PyEagerTaskFactoryLoopTests.test_staggered_race_with_eager_tasks)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "b:\uildarea\3.x.ware-win11.refleak\build\Lib\test\test_asyncio\test_eager_task_factory.py", line 238, in test_staggered_race_with_eager_tasks
    self.run_coro(run())
    ~~~~~~~~~~~~~^^^^^^^
  File "b:\uildarea\3.x.ware-win11.refleak\build\Lib\test\test_asyncio\test_eager_task_factory.py", line 36, in run_coro
    return self.loop.run_until_complete(coro)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "b:\uildarea\3.x.ware-win11.refleak\build\Lib\asyncio\base_events.py", line 720, in run_until_complete
    return future.result()
           ~~~~~~~~~~~~~^^
  File "b:\uildarea\3.x.ware-win11.refleak\build\Lib\asyncio\futures.py", line 198, in result
    raise self._exception.with_traceback(self._exception_tb)
  File "b:\uildarea\3.x.ware-win11.refleak\build\Lib\asyncio\tasks.py", line 289, in __step_run_and_handle_result
    result = coro.send(None)
  File "b:\uildarea\3.x.ware-win11.refleak\build\Lib\test\test_asyncio\test_eager_task_factory.py", line 232, in run
    self.assertEqual(winner, 'sleep1')
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
AssertionError: 'sleep2' != 'sleep1'
- sleep2
?      ^
+ sleep1
?      ^

I'm working on a fix.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions