Repository navigation
test: deflake recurring task test and fix tests hanging on Python 3.10 - #2287
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2287 +/- ##
==========================================
- Coverage 94.12% 94.06% -0.06%
==========================================
Files 183 183
Lines 13570 13570
==========================================
- Hits 12773 12765 -8
- Misses 797 805 +8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
vdusek
marked this pull request as ready for review
October 12, 2026 07:20
Collaborator
Author
|
Let's just skip the problematic tests on 3.10 + Linux, since the failures are caused by an upstream issue, and we will drop 3.10 support soon anyway. |
Mantisus
approved these changes
Oct 13, 2026
…of skipping hanging tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two ubuntu / Python 3.10 CI failures on master.
test_recurring_task.py::test_executionslept 200 ms and expected at least 3 calls at a 30 ms delay, but a slow runner got 1 (run). It now waits for the third call with a 5 s timeout and no longer needsrun_alone.A worker hung in a fixture teardown and the job ran until GitHub cancelled it after 6 hours (run). The cause is in
backports.asyncio.runner, which pytest-asyncio uses on 3.10.Runner.run(coro, context=...)patchescontextvars.copy_contextprocess-wide while it creates the task, so the test server's thread can pick up the fixture's context. When both threads enter it at once,Context.runraisescannot enter context: ... is already entered, the task step is dropped, and the teardown waits forever. On Python 3.10,pytest-asynciois pinned to 1.0.x, the last release before it started using the backports runner. That pin also brings in pytest 8, and ty can't type-checkpytest.skip()with it, so the six runtime skips in the storage tests raisepytest.skip.Exceptioninstead.For any future hang,
timeout_method = "thread"kills the stuck worker (the default signal method never fired in the 6 h run), andfaulthandler_timeout = 600dumps every thread's stack into the log. The job-level cap is in apify/workflows#333.✍️ Drafted by Claude Code