Skip to content

refactor(bigtable): apply CbtTestProxy client timeout per call - #15351

Open
alexoneill wants to merge 1 commit into
googleapis:mainfrom
alexoneill:refactor-bigtable-test-proxy-per-call-timeout
Open

alexoneill wants to merge 1 commit into
googleapis:mainfrom
alexoneill:refactor-bigtable-test-proxy-per-call-timeout

Conversation

@alexoneill

Copy link
Copy Markdown
Contributor

Store Optional<Duration> perOperationTimeout() on CbtClient instead of mutating BigtableDataSettings in createClient for the 7 callable-backed data operations (mutateRow, bulkMutateRows, readRow, readRows, sampleRowKeys, checkAndMutateRow, and readModifyWriteRow), leaving their default RetrySettings intact.

  • Add createCallContextWithTimeout, callWithTimeout, and runWithTimeout helpers in CbtTestProxy so each handler derives its per-call ApiCallContext from unmodified library defaults when a timeout is present.
  • Keep executeQuery / prepareQuery timeout settings on BigtableDataSettings for now so this PR introduces no behavior changes.
  • Add testClientLevelPerOperationTimeout and a compact SlowBigtableService harness in CbtTestProxyTest covering client-level timeout enforcement across all 8 operations.

Store `Optional<Duration> perOperationTimeout()` on `CbtClient` instead of mutating `BigtableDataSettings` in `createClient` for the 7 callable-backed data operations (`mutateRow`, `bulkMutateRows`, `readRow`, `readRows`, `sampleRowKeys`, `checkAndMutateRow`, and `readModifyWriteRow`), leaving their default `RetrySettings` intact.

- Add `createCallContextWithTimeout`, `callWithTimeout`, and `runWithTimeout` helpers in `CbtTestProxy` so each handler derives its per-call `ApiCallContext` from unmodified library defaults when a timeout is present.
- Keep `executeQuery` / `prepareQuery` timeout settings on `BigtableDataSettings` for now so this PR introduces no behavior changes.
- Add `testClientLevelPerOperationTimeout` and a compact `SlowBigtableService` harness in `CbtTestProxyTest` covering client-level timeout enforcement across all 8 operations.
@alexoneill
alexoneill requested review from a team as code owners December 1, 2026 21:02
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

Gemini encountered an error creating the review. You can try again by commenting /gemini review.

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant