You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
leaktest does not play well with go test -timeout=5s. Regardless, waiting 5 seconds for goroutines to shut down seems excessive. My expectation was that goroutines would be checked as soon as the deferred function was called.
I suggest adding an optional timeout argument to Check, or providing some other way of delaying the check. Note that if Check did not delay by default, you could implement this behavior yourself:
Furthermore, this would give you more fine-grained control over when the check executes. For example, you could wait on a channel before checking. The only reason I propose adding an optional timeout argument is because it seems like a common case.
The text was updated successfully, but these errors were encountered:
I think I'll move the canonical imports to use gopkg.in shortly, mark the current version of the package as .v1 and then make a .v2 that removes the default timeout and adds a CheckTimeout(*testing.T, time.Duration) that works like you'd suggest. Sound OK?
leaktest does not play well with
go test -timeout=5s
. Regardless, waiting 5 seconds for goroutines to shut down seems excessive. My expectation was that goroutines would be checked as soon as the deferred function was called.I suggest adding an optional timeout argument to
Check
, or providing some other way of delaying the check. Note that ifCheck
did not delay by default, you could implement this behavior yourself:Furthermore, this would give you more fine-grained control over when the check executes. For example, you could wait on a channel before checking. The only reason I propose adding an optional timeout argument is because it seems like a common case.
The text was updated successfully, but these errors were encountered: