mirror of
https://github.com/netbirdio/netbird.git
synced 2026-09-12 17:59:06 +02:00
The Management / Unit (mysql) job hit the 20 minute go test budget in management/server and left only a goroutine dump of several thousand leaked goroutines, with the "running tests:" header far out of reach of the job log viewer. The last live test goroutine was runnable, not blocked: the suite was still progressing when the alarm fired. tools/gotestsummary reads a go test -json stream and prints one line per finished test, the output of failed tests, the head of a package panic (the timeout header and the running tests list), tests that never reported a result, and the slowest tests per package. NewTestStoreFromSQL now logs how long the sqlite seed store and the engine under test took to come up; the summarizer attributes those to the owning test so the per-test store cost on mysql and postgres is visible in CI. Two leaks made the dump unreadable and are fixed here: the sqlite seed store was never closed once a mysql or postgres store replaced it, and buildTestManager passed context.Background() to the metrics, caches and controllers, so every test left its P95 flushers and cleanup loops running until the process exited.