Skip to content

test(spanner): deflake testCreateSessionDeadlineExceededWithNoSessionCreateWaitTime - #14285

Merged
sakthivelmanii merged 2 commits into
mainfrom
deflake-multiplexed-session-mock-test
Sep 9, 2026
Merged

test(spanner): deflake testCreateSessionDeadlineExceededWithNoSessionCreateWaitTime#14285
sakthivelmanii merged 2 commits into
mainfrom
deflake-multiplexed-session-mock-test

Conversation

@sakthivelmanii

Copy link
Copy Markdown
Contributor

Freeze MockSpanner before initializing DatabaseClient to deterministically bind the transaction to the initial failing CreateSession attempt, and enclose ReadContext in try-with-resources to ensure proper transaction cleanup.

…CreateWaitTime

Freeze MockSpanner before initializing DatabaseClient to deterministically bind the transaction to the initial failing CreateSession attempt, and enclose ReadContext in try-with-resources to ensure proper transaction cleanup.
@sakthivelmanii
sakthivelmanii requested review from a team as code owners September 7, 2026 15:32

@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 updates the MultiplexedSessionDatabaseClientMockServerTest to wait for the initial CreateSession request to reach the mock server and freeze before acquiring the ReadContext. However, a review comment points out a potential race condition where calling mockSpanner.unfreeze() before executing the query could cause the client to clear the failed session and initiate a new successful request. The reviewer suggests calling unfreeze() after executing the query but before calling resultSet.next() to guarantee the query binds to the initial failing attempt.

@sakthivelmanii
sakthivelmanii merged commit 7a201cc into main Sep 9, 2026
206 checks passed
@sakthivelmanii
sakthivelmanii deleted the deflake-multiplexed-session-mock-test branch September 9, 2026 07:49
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