Skip to content

test(showcase): add integration tests for retries - #13929

Open
nnicolee wants to merge 5 commits into
mainfrom
test/showcase-retries
Open

test(showcase): add integration tests for retries#13929
nnicolee wants to merge 5 commits into
mainfrom
test/showcase-retries

Conversation

@nnicolee

Copy link
Copy Markdown
Contributor

Description

This PR adds E2E retry integration tests verifying that client-side retry attempts adhere to the configured exponential backoff settings for both gRPC and HTTP/JSON transports.

Key Changes

  • SequenceService Client configuration:
    • Adds client initializer methods to TestClientInitializer for creating the SequenceServiceClient configured with custom retry parameters and disabled jitter.
  • Timing-Safe Timing assertions:
    • Uses the mock server's stateful SequenceService to record attempt timestamps on the server side, removing local CPU context-switching scheduling lag as a source of test flakiness.
    • Configures a standard error sequence ([UNAVAILABLE, UNAVAILABLE, UNAVAILABLE, OK]) and asserts that retry delays fall within the target exponential backoff timeline (with lenient safety margins).

@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 integration tests for verifying exponential backoff retries on both gRPC and HTTP/JSON clients using the SequenceServiceClient. It also adds corresponding helper methods in TestClientInitializer to initialize these clients with custom retry settings. The feedback suggests simplifying the helper methods in TestClientInitializer by configuring SequenceServiceSettings.Builder directly, which avoids intermediate stub settings and unnecessary object allocations.

@nnicolee
nnicolee marked this pull request as ready for review July 28, 2026 18:42
@nnicolee
nnicolee requested review from a team as code owners July 28, 2026 18:42
@nnicolee
nnicolee requested a review from lqiu96 July 28, 2026 18:43
@nnicolee nnicolee changed the title test(showcase): add integration tests for exponential backoff retries using SequenceService test(showcase): add integration tests for retries Jul 29, 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