From b149c5c20ec3330fe2bd7ad5c7daf6e925cce3dd Mon Sep 17 00:00:00 2001 From: Ralf Anton Beier Date: Sat, 6 Jun 2026 00:49:41 +0200 Subject: [PATCH] ci(nextest): retry flaky tests so one serve-test race doesn't red main (closes #493) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Main's Test gate flaked red on commit 00876df (additive dashboard HTML) while the code was sound — `cargo test --workspace` and `cargo nextest run --all --profile ci` both pass locally (2075/2075). Root cause: the ci nextest profile had `fail-fast = false` but no `retries`, so one flaky serve/integration test (port/timing race under CI parallelism) fails the whole gate. The repo has band-aided this per-test three times already. Add `retries = 2` to [profile.ci]: a test that passes on retry is reported FLAKY (visible in the summary + JUnit) instead of failing the gate and reddening main; a genuinely-broken test still fails after all retries, so real regressions aren't hidden. Confirmed with: cargo nextest list --profile ci (config parses); cargo nextest run --all --profile ci → 2075 passed / 0 failed. --- .config/nextest.toml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.config/nextest.toml b/.config/nextest.toml index 8ac5d334..3311d53f 100644 --- a/.config/nextest.toml +++ b/.config/nextest.toml @@ -4,6 +4,15 @@ [profile.ci] # Fail-fast disabled so all tests run even if some fail fail-fast = false +# Retry failed tests up to twice before reporting failure. The serve/integration +# tests bind ports and spin up a server, so under CI parallelism one +# occasionally fails on a timing/port race (this repo has several historical +# "fix flaky test" fixes). A test that passes on retry is reported FLAKY +# (visible in the summary) rather than failing the whole Test gate and +# reddening main; a genuinely-broken test still fails after all retries. +# Verified: `cargo test --workspace` + `nextest run --all` pass locally — the +# gate flakes, the code does not. +retries = 2 [profile.ci.junit] # Output JUnit XML for CI consumption