-
Notifications
You must be signed in to change notification settings - Fork 375
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
feat(generator): connection respects per call policies #8013
Conversation
Google Cloud Build Logs
ℹ️ NOTE: Kokoro logs are linked from "Details" below. |
a05762a
to
c52612d
Compare
Google Cloud Build Logs
ℹ️ NOTE: Kokoro logs are linked from "Details" below. |
Codecov Report
@@ Coverage Diff @@
## main #8013 +/- ##
==========================================
- Coverage 95.09% 95.09% -0.01%
==========================================
Files 1307 1308 +1
Lines 117472 117569 +97
==========================================
+ Hits 111715 111805 +90
- Misses 5757 5764 +7
Continue to review full report at Codecov.
|
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.
There are a couple of PRs in flight that you may need to coordinate with.
auto clone = absl::make_unique<MockRetryPolicy>(); | ||
// We will just say the policy is never exhausted, and use a permanent error | ||
// to break out of the loop. | ||
EXPECT_CALL(*clone, IsExhausted).WillRepeatedly(Return(false)); |
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.
Consider .Times(AtLeast(1)).WillRepeatedly(Return(false));
?
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.
sure
c52612d
to
bbc35f8
Compare
Google Cloud Build Logs
ℹ️ NOTE: Kokoro logs are linked from "Details" below. |
Fixes #8002
First commit has the logic changes in
generator/
Second commit has the changes to the golden files
Third commit has the changes to generated libraries in
google/cloud/...
I decided to use
if
blocks instead of predicates, per this discussion.We have the following types of calls:
Letters in parentheses are the policies used in such a call.
R = Retry, B = Backoff, I = Idempotency, P = Polling.
The bold letters are the ones I actually tested for. I did not feel like writing any other tests. I would begrudgingly add more tests, if asked nicely.
This change is