Skip to content

Conversation

@hasson82
Copy link
Contributor

@hasson82 hasson82 commented Jun 22, 2024

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

hasson82 added 27 commits June 19, 2024 13:33
…thub.com:hasson82/grpc-go into hasson82/add-context-with-timeout-checks-to-lint
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jun 22, 2024

@codecov
Copy link

codecov bot commented Jun 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.47%. Comparing base (4dd7f55) to head (136b4ba).
Report is 23 commits behind head on master.

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     

see 307 files with indirect coverage changes

@aranjans aranjans added this to the 1.66 Release milestone Jun 24, 2024
@hasson82 hasson82 requested a review from atollena June 28, 2024 20:48
Copy link
Member

@dfawley dfawley left a 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.

@hasson82 hasson82 requested a review from dfawley July 3, 2024 18:52
Copy link
Member

@dfawley dfawley left a 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.

@zasweq zasweq changed the title Linter rule for using context.WithTimeout on tests Add linter rule for using context.WithTimeout on tests Jul 3, 2024
@zasweq zasweq changed the title Add linter rule for using context.WithTimeout on tests scripts: add linter rule for using context.WithTimeout on tests Jul 3, 2024
@zasweq zasweq merged commit bdd707e into grpc:master Jul 3, 2024
1 check passed
printchard pushed a commit to printchard/grpc-go that referenced this pull request Jul 8, 2024
printchard pushed a commit to printchard/grpc-go that referenced this pull request Jul 8, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants