Skip to content

test(retry): add a test which ensures expected behavior of new retry handlers#1119

Merged
BenWhitehead merged 5 commits intogoogleapis:mainfrom
BenWhitehead:retry-regression-unit-tests
Nov 1, 2021
Merged

test(retry): add a test which ensures expected behavior of new retry handlers#1119
BenWhitehead merged 5 commits intogoogleapis:mainfrom
BenWhitehead:retry-regression-unit-tests

Conversation

@BenWhitehead
Copy link
Copy Markdown
Collaborator

In addition to providing the new handlers which are validated to some extent with the retry conformance suite, we also want to ensure we maintain support for "java specific" errors which historically are already handled my the core library. In some ways this also functions as a regression suite of errors we want to keep track of for retry purposes.

…handlers

In addition to providing the new handlers which are validated to some extent with the retry conformance suite, we also want to ensure we maintain support for "java specific" errors which historically are already handled my the core library. In some ways this also functions as a regression suite of errors we want to keep track of for retry purposes.
@BenWhitehead BenWhitehead requested a review from a team October 20, 2021 00:32
@product-auto-label product-auto-label bot added the api: storage Issues related to the googleapis/java-storage API. label Oct 20, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Oct 20, 2021
@BenWhitehead BenWhitehead requested a review from frankyn October 20, 2021 00:33
Copy link
Copy Markdown
Contributor

@frankyn frankyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two questions.

*/
@SuppressWarnings("ConstantConditions")
@Test
public void validateBehavior() {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will there be another validateBehavior when introducing for example Retry All operations?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure we need the same type of test for a Retry All type scenario. If the uniform retry strategy is used by someone, everything will behave as if it is idempotent so all nonidempotent operations will implicitly be more permissive. If specifically the StorageRetryStrategy.getUniformStorageRetryStrategy() is the thing in question, that is implemented to use the idempotent config from the Default strategy and would not be executing new code, it would only be doubling the number of cases.

Add case where storage retry is based on if cause is a special IOException
@BenWhitehead BenWhitehead merged commit 2d64f90 into googleapis:main Nov 1, 2021
@BenWhitehead BenWhitehead deleted the retry-regression-unit-tests branch November 1, 2021 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storage Issues related to the googleapis/java-storage API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants