Repository navigation
test: use upstream's per-test timeout, and fix what the full matrix showed - #3281
Merged
Pavel Feldman (pavelfeldman) merged 1 commit intoOct 21, 2026
Merged
Conversation
Yury Semikhatsky (yury-s)
approved these changes
Oct 20, 2026
Pavel Feldman (pavelfeldman)
force-pushed
the
slow_markers
branch
from
October 21, 2026 00:52
8952056 to
c60d192
Compare
Pavel Feldman (pavelfeldman)
force-pushed
the
slow_markers
branch
from
October 21, 2026 03:23
c60d192 to
a7410af
Compare
…howed A test times out after 30 seconds, as upstream, and the fixtures count, as upstream counts them (pyproject.toml). A test marked slow gets three times that, as test.slow() gives upstream: the ports of the tests that call it (IF-009, IF-011, FC-001, CC-040, BT-076, BT-077, BT-091, all of screencast.spec.ts and signals.spec.ts), and the Python-only tests that wait longer by design (the pause tests, the subprocess and multiprocessing tests). The wheel installation test gets its own bound. CI and test.sh drop their --timeout flags. The timeout method is thread, which ends the process of a test that hangs; xdist replaces the worker. The signal method can not be used: asyncio's Handle._run() catches and logs every BaseException but SystemExit and KeyboardInterrupt, so a timeout that fires while the event loop runs a callback is lost and the test hangs on (the jobs that ran into the 90-minute limit). tests/conftest.py cancels the timer before the report of a failure is built, where it fired inside pytest when a test failed just before its deadline, and gives the teardown a timer of its own. Races and failures that the full suites on every bot showed: - find_free_port() reserves a port with a dual-stack bind, and a listener that gets 127.0.0.1 but loses ::1 to another process takes a new port instead of going on with IPv4 only. The IPv6-only server of the socks tests could take a port that the test server of another worker held on 127.0.0.1, and the browser, which resolves localhost to ::1 first, reached the wrong server. - The child of the signal tests closes the browser on SIGHUP and ends when it has closed, as the Node.js child does. The Python client has no SIGHUP handler, so the signal ended the child at once, and the driver, left without a client, killed the browser and could crash on its closed pipe before it logged the exit; SI-006 failed one time in two on WebKit. - The child of the signal tests gets a short temporary directory: under tmp_path, the socket of Chrome's ProcessSingleton in the user data dir was longer than a Unix socket path allows, and the stable channels crashed at launch. - A zone whose coroutine is closed from another context (GeneratorExit) can not reset its ContextVar token; the reset raised in every job. - CI runs Linux on ubuntu-22.04, where headless Firefox has WebGL (CA-008, CA-009); the 24.04 image has none. The async step runs after a failed sync step too, so that each job reports both suites. The ports are not changed to pass: AGENTS.md says so now, and tests/transform.md has the rules of the port of the tests. transform.md, the rules of the port of the client, moves to playwright/_impl.
Pavel Feldman (pavelfeldman)
force-pushed
the
slow_markers
branch
from
October 21, 2026 04:37
a7410af to
86208da
Compare
Pavel Feldman (pavelfeldman)
merged commit Oct 21, 2026
c4ee123
into
microsoft:main
21 of 29 checks passed
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.
Summary
@pytest.mark.slowtriples it (the ports of upstream'stest.slow()tests, and the Python-only tests that wait longer by design). The thread method of pytest-timeout: the signal method's exception is swallowed by asyncio'sHandle._run(), which is why jobs hung to the 90-minute limit. The timer is cancelled before a failure's report is built, which fired inside pytest before. CI andtest.shdrop their--timeoutflags.127.0.0.1and::1, and a listener that loses::1to another process takes a new port: the browser resolveslocalhostto::1first and could reach another worker's server.tmp_path, which crashed the stable channels). A zone closed from another context no longer raises on itsContextVarreset.AGENTS.mdsays so now,tests/transform.mdhas the rules of the port of the tests, andtransform.mdmoves toplaywright/_impl/.