-
-
Notifications
You must be signed in to change notification settings - Fork 300
Open
Description
When a context is canceled, context.Cause may be able to provide a better explanation that just "context canceled" (the error returned by Context.Err). This can be useful to figure out which timeout triggered, in particular when Ginkgo also supports it (onsi/ginkgo#1326).
gomega/internal/async_assertion.go
Line 556 in f1c8757
| fail("Context was cancelled") |
When a Gomega async assertion has its own timeout and the callback function accepts a context, create a context that contains that timeout and pass that to the callback. Right now, the context given to gomega.Eventually is passed through (
gomega/internal/async_assertion.go
Line 285 in f1c8757
| inValues = append(inValues, reflect.ValueOf(assertion.ctx)) |
Metadata
Metadata
Assignees
Labels
No labels