mirror of
https://github.com/tailscale/tailscale.git
synced 2026-07-29 08:46:33 -04:00
The fake ticker has a one-element channel buffer and drops ticks when the probe loop goroutine isn't already blocked on the channel, so advancing the fake clock 50 times in a tight loop didn't guarantee that the loop observed enough ticks to start three concurrent probe runs. Under CI load, only two of the three run goroutines could be spawned before the convergence timeout expired. Advance the clock inside the polling loop instead, so ticks keep firing until all three probe goroutines have started. Verified with flakestress: the old test failed within ~41k runs, while the fixed test passed 175,214 runs with no failures. See http://flakes/analyze-test?name=tailscale.com%2Fprober.TestProberConcurrency Updates #deflake Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com> Change-Id: I673a4918bbb5fea6b650e0dc1bc491c4af922b19