-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scripts: add linter rule for using context.WithTimeout on tests #7342
scripts: add linter rule for using context.WithTimeout on tests #7342
Conversation
…t is coming before metadata
…thub.com:hasson82/grpc-go into hasson82/add-context-with-timeout-checks-to-lint
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #7342 +/- ##
==========================================
+ Coverage 80.58% 81.47% +0.89%
==========================================
Files 349 348 -1
Lines 34056 26744 -7312
==========================================
- Hits 27445 21791 -5654
+ Misses 5431 3770 -1661
- Partials 1180 1183 +3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this. It looks great generally, but I have a nit about creating contexts with timeout only once per test in several of the tests changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks good, thank you.
This PR is adding a linter rule for checking each context usage in tests is using context.WithTimeout.
Based on #7304.
The PR grew a lot, so decided to ignore some packages in the linter rule and will deal with them in upcoming PRs.
RELEASE NOTES: none