mirror of
https://github.com/livekit/livekit.git
synced 2026-11-05 08:58:19 +00:00
TestDownTrackResumesAfterBandwidthPause called logger.InitFromConfig (SetLogger) mid-run while the hwstats CPU monitor goroutine, started by prometheus.Init in forwardstats_test, read the same non-atomic logger package globals. go test -race flagged the write-vs-read and failed CI. Set the global logger once in TestMain, before any test starts that goroutine, and drop the per-test InitFromConfig. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>