tstest: relax ResourceCheck to 3s

It was only waiting for 0.5s (5ms * 100), but our CI
is too slow so make it wait up to 3s (10ms * 300).

Updates tailscale/corp#14515

Signed-off-by: Maisem Ali <maisem@tailscale.com>
pull/9267/head
Maisem Ali 1 year ago committed by Brad Fitzpatrick
parent ac7b4d62fd
commit c2241248c8

@ -22,11 +22,11 @@ func ResourceCheck(tb testing.TB) {
return return
} }
// Goroutines might be still exiting. // Goroutines might be still exiting.
for i := 0; i < 100; i++ { for i := 0; i < 300; i++ {
if runtime.NumGoroutine() <= startN { if runtime.NumGoroutine() <= startN {
return return
} }
time.Sleep(5 * time.Millisecond) time.Sleep(10 * time.Millisecond)
} }
endN, endStacks := goroutines() endN, endStacks := goroutines()
if endN <= startN { if endN <= startN {

Loading…
Cancel
Save