ci: split the quarantine's TestHeadlessConnections run in two
The quarantine shard was the slowest after the rebalance (95 to 106 s): its nine TestHeadlessConnections subtests took 91 to 105 s in one go test, TestMixedVersions 27 s beside them. A quarantined test with more than five entries now runs as even runs of at most five, side by side (QUARANTINE_RUN). Each entry still runs once, with its one retry.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+12
−2
scripts/ci-test.py+12 −2
CI passed — run details
diff --git a/scripts/ci-test.py b/scripts/ci-test.py| index 0f0d943c..fa969977 100755 |
| --- a/scripts/ci-test.py |
| +++ b/scripts/ci-test.py |
| @@ -140,6 +140,11 @@ TEST_TOOLS = ["bwrap", "claude", "codex", "git", "python3", "sh", "srt", "tar"] |
| TEST_TOOL_DIRS = {"try-bin": "~/.local/share/equipo/try/bin"} |
| QUARANTINE = "scripts/ci-quarantine.txt" |
| +# The quarantine runs each quarantined test's entries in one go test, the |
| +# go tests side by side; more subtests of one test than this are split |
| +# into even runs of at most this many (nine TestHeadlessConnections |
| +# subtests took 91 to 105 s in one). |
| +QUARANTINE_RUN = 5 |
| TEST_FUNC = re.compile(r"^func (Test[A-Za-z0-9_]*)\(\w+ \*testing\.T\)", re.M) |
| @@ -850,8 +855,13 @@ def run_quarantine(): |
| def tags(package, top): |
| return BROWSER_TAGS if top in browser.get(package, []) else TAGS |
| - with ThreadPoolExecutor(max_workers=max(1, len(groups))) as pool: |
| - futures = [pool.submit(run_group, p, tests, env, tags(p, top)) for (p, top), tests in sorted(groups.items())] |
| + runs = [] |
| + for (p, top), tests in sorted(groups.items()): |
| + tests = sorted(tests) |
| + size = -(-len(tests) // -(-len(tests) // QUARANTINE_RUN)) |
| + runs += [(p, top, tests[i:i + size]) for i in range(0, len(tests), size)] |
| + with ThreadPoolExecutor(max_workers=max(1, len(runs))) as pool: |
| + futures = [pool.submit(run_group, p, tests, env, tags(p, top)) for p, top, tests in runs] |
| results = [f.result() for f in futures] |
| flakes, broken = [], [] |
| for report, flaky, bad in results: |