You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TestLocalAdoptionSavesAndReloadsEligibleModel flakes under the race detector: its probe uses the 400ms default timeout #1132
Seen on #886 at 433653b8, which has main at 4dc603f6 merged in. It failed in the Race Detector job on the first attempt, and a re-run of the same commit passed.
What happened
--- FAIL: TestLocalAdoptionSavesAndReloadsEligibleModel (0.74s)
provider_adoption_test.go:57: expected one detected runtime: []
Cause
The test calls provideronboarding.DetectLocalRuntimes against its own httptest server without setting Timeout, so the probe gets defaultLocalProbeTimeout, which is 400ms. probeLocalRuntime treats a timeout as "not running" and drops the candidate without an error, so one slow loopback round trip under -race on a busy runner becomes an empty result. The run took 0.74s, which fits a probe that hit the deadline. Nothing in #886 touches this path, and the test is about adoption rather than probe timing.
I couldn't reproduce it locally. Ten runs under -race, and twenty more with every core busy, all passed on a 20-core Windows machine.
Fix
Pass a test-sized Timeout of a few seconds in the test's LocalDetectOptions. The production default stays at 400ms.
Activity
test(cli): give the local adoption probe a test-sized timeout (#1136)