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>
This commit is contained in:
Maisem Ali 2023-09-06 15:29:44 -07:00 committed by Brad Fitzpatrick
parent ac7b4d62fd
commit c2241248c8
1 changed files with 2 additions and 2 deletions

View File

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