Skip to content

fix(test): resolve flakiness in TestStatementTimeout#827

Open
olavloite wants to merge 1 commit into
mainfrom
fix/698-flaky-statement-timeout-test
Open

fix(test): resolve flakiness in TestStatementTimeout#827
olavloite wants to merge 1 commit into
mainfrom
fix/698-flaky-statement-timeout-test

Conversation

@olavloite

@olavloite olavloite commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Resolves the flakiness in TestStatementTimeout by setting simulated execution time for MethodExecuteSql. DML statements use ExecuteSql under the hood, so without simulated delay they could execute in less than 1ms (returning OK instead of DeadlineExceeded).

Fixes #698

@olavloite olavloite requested a review from a team as a code owner June 11, 2026 13:16

@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 TestStatementTimeout function in stmt_with_mockserver_test.go to configure a simulated execution time for ExecuteSql in addition to ExecuteStreamingSql. This change aligns with the updated comment clarifying that the database/sql driver uses ExecuteStreamingSql for queries and ExecuteSql for DMLs. There are no review comments, so no additional feedback is provided.

@olavloite

Copy link
Copy Markdown
Collaborator Author

LGTM. Setting a simulated execution time for MethodExecuteSql ensures that DML statements consistently hit the timeout during tests, resolving TestStatementTimeout flakiness on fast execution paths.

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.

TestStatementTimeout is flaky

1 participant