var quietLog … func TestMain(m *testing.M) { … } func interestingGoroutines() (gs []string) { … } // Verify the other tests didn't leave any goroutines running. func goroutineLeaked() bool { … } // setParallel marks t as a parallel test if we're in short mode // (all.bash), but as a serial test otherwise. Using t.Parallel isn't // compatible with the afterTest func in non-short mode. func setParallel(t *testing.T) { … } func runningBenchmarks() bool { … } var leakReported … func afterTest(t testing.TB) { … } // waitCondition waits for fn to return true, // checking immediately and then at exponentially increasing intervals. func waitCondition(t testing.TB, delay time.Duration, fn func(time.Duration) bool) { … }