Skip to content
This repository has been archived by the owner on Jun 28, 2022. It is now read-only.

PHP streaming retry and exception tests #1306

Merged
merged 2 commits into from
May 30, 2017

Conversation

michaelbausor
Copy link
Contributor

This PR:

  • Removes retry settings from PHP streaming methods. Retrying does not make sense in that context, and GAX prevents the use of retry settings for streaming methods in PHP
  • Changes from INTERNAL errors to DATA_LOSS errors, because some methods are configured to retry on INTERNAL errors(!)
  • Call getReceivedCalls in exception tests so that the stub will be exhausted

@codecov-io
Copy link

Codecov Report

Merging #1306 into master will decrease coverage by <.01%.
The diff coverage is 80%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1306      +/-   ##
============================================
- Coverage     86.52%   86.51%   -0.01%     
- Complexity     3816     3821       +5     
============================================
  Files           376      377       +1     
  Lines         15260    15264       +4     
  Branches       1688     1688              
============================================
+ Hits          13203    13206       +3     
  Misses         1609     1609              
- Partials        448      449       +1
Impacted Files Coverage Δ Complexity Δ
...main/java/com/google/api/codegen/GapicContext.java 63.41% <100%> (+0.91%) 12 <1> (+1) ⬆️
...le/api/codegen/gapic/MainGapicProviderFactory.java 94.23% <100%> (ø) 16 <0> (ø) ⬇️
.../clientconfig/php/PhpClientConfigGapicContext.java 66.66% <66.66%> (ø) 4 <4> (?)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4de4575...8e7203e. Read the comment docs.

@@ -88,12 +88,12 @@
retryCodesName = methodConfig.getRetryCodesConfigName, \
retryParamsName = methodConfig.getRetrySettingsConfigName
"{@method.getSimpleName}": {
@if or(and(retryCodesName, retryParamsName), isBatching)
@if or(and(and(retryCodesName, retryParamsName), context.isRetryingSupported(method)), isBatching)

This comment was marked as spam.

This comment was marked as spam.


@Override
public boolean isRetryingSupported(Method method) {
return isSupported(method) && !method.getRequestStreaming() && !method.getResponseStreaming();

This comment was marked as spam.

This comment was marked as spam.

@garrettjonesgoogle
Copy link
Member

LGTM

@michaelbausor michaelbausor merged commit a7603d7 into googleapis:master May 30, 2017
@michaelbausor michaelbausor deleted the streaming-retry branch May 30, 2017 17:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants