Skip to content

refactor(gax): consolidate grpc-rust test mocks - #6519

Merged
joshuatants merged 4 commits into
googleapis:grpc_rustfrom
joshuatants:grpc_rust_refactor_test_helpers
Aug 25, 2026
Merged

refactor(gax): consolidate grpc-rust test mocks#6519
joshuatants merged 4 commits into
googleapis:grpc_rustfrom
joshuatants:grpc_rust_refactor_test_helpers

Conversation

@joshuatants

Copy link
Copy Markdown
Contributor

For #5991.

@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 refactors the gRPC test helpers by consolidating common mock implementations—such as MockSendStream, MockRecvStream, MockInvoker, and FailAfterFirstSendStream—from bidi.rs and unary.rs into a shared testing.rs module, reducing code duplication. The review feedback suggests simplifying MockInvoker by removing an unnecessary Arc wrapper around observed_headers and using TestMessage::new in bidi.rs to maintain consistency across tests.

Comment thread src/gax-internal/src/grpc/grpc_rust/testing.rs
Comment thread src/gax-internal/src/grpc/grpc_rust/bidi.rs Outdated
@codecov

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.18182% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.42%. Comparing base (bf6cba4) to head (041d709).
⚠️ Report is 1 commits behind head on grpc_rust.

Files with missing lines Patch % Lines
src/gax-internal/src/grpc/grpc_rust/testing.rs 97.14% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           grpc_rust    #6519    +/-   ##
===========================================
  Coverage      96.42%   96.42%            
===========================================
  Files            307      307            
  Lines          86490    86331   -159     
===========================================
- Hits           83397    83245   -152     
+ Misses          3093     3086     -7     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@joshuatants
joshuatants force-pushed the grpc_rust_refactor_test_helpers branch from dcf5c01 to dcaef89 Compare August 24, 2026 03:42
Comment thread src/gax-internal/src/grpc/grpc_rust/testing.rs
Comment thread src/gax-internal/src/grpc/grpc_rust/testing.rs Outdated
@joshuatants
joshuatants marked this pull request as ready for review August 25, 2026 02:23
@joshuatants
joshuatants requested a review from a team as a code owner August 25, 2026 02:23
@joshuatants
joshuatants merged commit 1c4a390 into googleapis:grpc_rust Aug 25, 2026
33 checks passed
@joshuatants
joshuatants deleted the grpc_rust_refactor_test_helpers branch August 25, 2026 02:24
joshuatants added a commit to joshuatants/google-cloud-rust that referenced this pull request Aug 25, 2026
joshuatants added a commit to joshuatants/google-cloud-rust that referenced this pull request Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants