Skip to content

test(storage): Add RCU Bidi Read and Bidi Write integration tests - #14531

Open
nidhiii-27 wants to merge 6 commits into
feat/storage-runner-rcu-parameterized-setupfrom
feat/storage-rcu-bidi-integration-tests
Open

nidhiii-27 wants to merge 6 commits into
feat/storage-runner-rcu-parameterized-setupfrom
feat/storage-rcu-bidi-integration-tests

Conversation

@nidhiii-27

@nidhiii-27 nidhiii-27 commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Adds integration and fake tests for Rapid Cache Ultra (RCU) bidirectional read and write streams (stacked on #14530):

  • Bidi Write Integration Tests (ITAppendableUploadTest): Extends ITAppendableUploadTest to support ZONAL_RAPID and REGIONAL_RAPID locations (REGIONAL_RAPID skipped via @CrossRun.Ignore until RCU is enabled in prod).
  • Bidi Read Integration Tests (ITRcuBidiReadTest): Adds BlobReadSession integration tests for REGIONAL_RAPID covering session closure, concurrent zero-copy range reads, multi-range reads, non-existent bucket errors, and out-of-range reads (skipped via @Ignore until RCU is enabled in prod).
  • Redirect Counter Reset Tests (ITAppendableUploadFakeTest, ITObjectReadSessionFakeTest): Verifies Bidi Write and Bidi Read redirect counters reset on successful responses and validates routing_token header propagation.

Adds comprehensive integration tests and fake server tests for Rapid Cache Ultra (RCU) Bidi Read and Bidi Write streams in the Google Cloud Storage Java SDK.

Includes:
- ITAppendableUploadFakeTest: Verifies redirect counter resets on bidi write streams upon receiving an OK response.
- ITObjectReadSessionFakeTest: Verifies redirect counter resets on bidi read sessions and audits x-goog-request-params routing tokens.
- ITRcuBidiWriteTest: Parameterized integration test suite covering empty objects, chunked byte writes, flushes, and takeover finalization with CRC32C validation.
- ITRcuBidiReadTest: Integration test suite covering stream close during read, zero-copy range reads, multiple concurrent ranged reads, and out-of-range error propagation.

[Generated-by: AI]

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

This pull request introduces comprehensive integration tests for bidirectional reading and writing (ITRcuBidiWriteTest and ITRcuBidiReadTest), along with additional test coverage for redirect counter resets on response in fake tests. Feedback on the changes includes ensuring all test blob deletions are attempted in ITRcuBidiReadTest's cleanup by wrapping each in its own try-catch block, moving the non-parameterized empty object test out of the parameterized ITRcuBidiWriteTest class to avoid redundant skipped runs, standardizing arbitrary timeout values, and using the more idiomatic Google Truth 'isAnyOf' assertion.

@nidhiii-27 nidhiii-27 added the ai-generated Pull Request generated by AI label Sep 28, 2026
@nidhiii-27
nidhiii-27 added this pull request to stack #14532 September 28, 2026 10:56
… tests

1. Clean up test blobs individually in ITRcuBidiReadTest tearDownClass.
2. Standardize readAllBytes timeouts to 5 seconds in ITRcuBidiWriteTest.
3. Use isAnyOf assertion in ITRcuBidiReadTest for 404/403 status codes.

[Generated-by: AI]
@nidhiii-27
nidhiii-27 requested a review from Dhriti07 October 26, 2026 12:48
@nidhiii-27
nidhiii-27 marked this pull request as ready for review October 26, 2026 12:48
@nidhiii-27
nidhiii-27 requested review from a team as code owners October 26, 2026 12:48

@Dhriti07 Dhriti07 left a comment

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.

The RCU Read IT test is in the folder it and the RCU Write IT test is in storage not inside it. Can we have both the tests at the same directory level.

@nidhiii-27

Copy link
Copy Markdown
Contributor Author

Moved ITRcuBidiReadTest.java to src/test/java/com/google/cloud/storage/ and consolidated ITRcuBidiWriteTest into ITAppendableUploadTest.java in the same directory so all Bidi Read and Write ITs are at the same directory level.

Co-authored by AI Agent

@nidhiii-27
nidhiii-27 requested a review from Dhriti07 November 3, 2026 11:11

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-generated Pull Request generated by AI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants