mirror of
https://github.com/gravitational/teleport.git
synced 2026-11-01 21:52:02 +08:00
These tests have been flaky because clockwork's BlockUntil functionality isn't capable of blocking until the code is waiting on a timer. The synctest package introduced in Go 1.24 doesn't suffer from this limitation and allows us to reliably wait for the code to be blocked on the timer's channel. This package is experimental only available to the compiler when the GOEXPERIMENT=synctest environment variable is set. For this reason, the tests are hidden behind a build flag to prevent `go test` invocations from failing for devs who haven't set the env var. The makefile does set the variable, so `make test-go` _will_ execute the test (both locally and in CI). Closes #43559 Closes #40842