Skip to content
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

fix: update retry handling to retry idempotent requests that encounter unexpected EOF while parsing json responses #1155

Merged
merged 2 commits into from Dec 13, 2021

Commits on Dec 8, 2021

  1. fix: update retry handling to retry idempotent requests that encounte…

    …r unexpected EOF while parsing json responses
    
    ### Fix
    Update DefaultStorageRetryStrategy to account for EOF errors from Json. When parsing json it's possible we've only received a partial document and parsing will fail. If an unexpected EOF happens from parsing and the request is idempotent retry it.
    
    #### Tests
    Add two new integration tests which leverage the testbench to force the EOF to happen upon the completion of the resumable session.
    * Add 0B offset test
    * Add 10B offset test
    
    Add new cases to DefaultRetryHandlingBehaviorTest to ensure continued expected handling for the new EOF behavior.
    
    #### Refactor
    * Make TestBench.java (and its associated Builder) public to allow for use outside the retry conformance test package
    * Create new JUnit @rule DataGeneration moving com.google.cloud.storage.it.ITStorageTest#randString to it and change the signature to produce a ByteBuffer rather than a string. (this should simplify use since the strings returned were immediately turned to bytes)
    
    Fixes #1154
    
    deps: update storage-testbench to v0.10.0
    BenWhitehead committed Dec 8, 2021
    Copy the full SHA
    bc0239b View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    a69bde6 View commit details
    Browse the repository at this point in the history