Repository navigation
fix flaky tests - #14768
Open
jschueller wants to merge 7 commits into
Open
fix flaky tests#14768jschueller wants to merge 7 commits into
jschueller wants to merge 7 commits into
Conversation
jschueller
force-pushed
the
freshenv
branch
4 times, most recently
from
October 21, 2026 08:40
d1f89bc to
794b500
Compare
jschueller
force-pushed
the
freshenv
branch
5 times, most recently
from
October 21, 2026 11:41
b622ed0 to
9fe8de2
Compare
jayaddison
reviewed
Oct 21, 2026
Darlokt
suggested changes
Oct 21, 2026
Darlokt
reviewed
Oct 22, 2026
Raise linkcheck_timeout from 0.25s to 2s: on runners with few CPUs, a local test-server round-trip can stall for a few hundred milliseconds under full-suite load, producing a flaky 'timeout' status instead of 'working'. Also implement do_HEAD in CapitalisePathHandler so each URL needs a single round-trip instead of a 501 HEAD followed by a GET.
repo.or.cz intermittently fails with TLS handshake errors, breaking the docutils-latest and LaTeX jobs. The docutils/docutils mirror tracks the same trunk and is far more reliable from GH runners.
The html, latex, texinfo, and man rubric tests shared one testroot (and thus srcdir/env) with different builders. Whichever builder ran first on an xdist worker populated the pickled environment, so later tests skipped re-reading sources: the html test then missed the parse-time '"7" unknown' directive warning while still emitting the write-phase warning, failing test_html5_rubric at random. Separate source directories remove the sharing entirely, following the approach of sphinx-doc#14691.
Give the conditional missing-reference test its own source and build directory so its generated HTML cannot affect Python domain tests. Clear NO_COLOR and NO_COLOUR before forcing color in status iterator tests, making their expectations independent of the invoking environment.
Darlokt
approved these changes
Oct 22, 2026
Darlokt
left a comment
Contributor
There was a problem hiding this comment.
Looks good, the only thing is maybe the linkcheck timeout, but that can be looked at separately, this should resolve most of the instability.
This branch has not been deployed
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.
this fixes the flaky tests currently revealed by failed CI jobs:
there may be others but at least this allows to run CI somewhat reliably (ran a dozen times without any error)
cherry-picks from #14691 + #14572, see also #12191
/cc @jayaddison @DavidAGInnovation @Darlokt @jdillard @AA-Turner