Merged
Conversation
Reference (original issue report): stretchr#1611 This fix involves a complete rewrite of assertions that run background checks, with more idiomatic go routine codes and use of context.Context. Affected assertions: * Eventually * Never * EventuallyWithT We no longer run go routines that are not waited for. Timeouts and early exits are handled via context.Context. CollecT.FailNow() now also cancels the context of the caller instead. Significant changes: * callers should not expect Eventually and others to complete in the case of a blocking condition function. In particular, the condition function should never wait for an event that is triggered after Eventually. Complex or long-running condition function may use t.Context() to exit early if the test is failed. * callers may safely assume that only one go routine is executing the condition function (no race on writes) * test: asserted stretch/testify#480 is fixed Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #30 +/- ##
==========================================
+ Coverage 88.70% 88.72% +0.01%
==========================================
Files 63 63
Lines 8244 8338 +94
==========================================
+ Hits 7313 7398 +85
- Misses 768 776 +8
- Partials 163 164 +1 ☔ View full report in Codecov by Sentry. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change type
Please select: 🆕 New feature or enhancement|🔧 Bug fix'|📃 Documentation update
Short description
Fixes
Full description
Checklist