mirror of
https://github.com/tailscale/tailscale.git
synced 2025-04-23 17:31:43 +00:00
tstest: do not error if the there are fewer goroutines than at start
This fixes test failures like: ``` resource.go:34: goroutine count: expected 3, got 2 ``` Signed-off-by: Maisem Ali <maisem@tailscale.com>
This commit is contained in:
parent
5e61d52f91
commit
8fd5d3eaf3
@ -30,6 +30,9 @@ func ResourceCheck(tb testing.TB) {
|
|||||||
time.Sleep(5 * time.Millisecond)
|
time.Sleep(5 * time.Millisecond)
|
||||||
}
|
}
|
||||||
endN, endStacks := goroutines()
|
endN, endStacks := goroutines()
|
||||||
|
if endN <= startN {
|
||||||
|
return
|
||||||
|
}
|
||||||
tb.Logf("goroutine diff:\n%v\n", cmp.Diff(startStacks, endStacks))
|
tb.Logf("goroutine diff:\n%v\n", cmp.Diff(startStacks, endStacks))
|
||||||
tb.Fatalf("goroutine count: expected %d, got %d\n", startN, endN)
|
tb.Fatalf("goroutine count: expected %d, got %d\n", startN, endN)
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user