Skip to content

test(bigquery): Fix flaky ITBigQueryTest#testProjectIDFastSQLQueryWithJobId#12675

Merged
jinseopkim0 merged 2 commits intomainfrom
flaky_1
Apr 3, 2026
Merged

test(bigquery): Fix flaky ITBigQueryTest#testProjectIDFastSQLQueryWithJobId#12675
jinseopkim0 merged 2 commits intomainfrom
flaky_1

Conversation

@jinseopkim0
Copy link
Copy Markdown
Contributor

@jinseopkim0 jinseopkim0 commented Apr 3, 2026

This PR fixes a flaky integration test by replacing a strict string assertion
on a backend error message with a more robust assertion on the HTTP status
code (400 Bad Request).

It also refactors the test to use JUnit's `assertThrows` for cleaner and
more idiomatic exception testing, automatically preventing false positives
if the exception isn't thrown.

Fixes #12135

@jinseopkim0 jinseopkim0 requested a review from lqiu96 April 3, 2026 21:12
@jinseopkim0 jinseopkim0 marked this pull request as ready for review April 3, 2026 21:12
@jinseopkim0 jinseopkim0 requested review from a team as code owners April 3, 2026 21:12
@jinseopkim0 jinseopkim0 enabled auto-merge (squash) April 3, 2026 21:12
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

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 error handling assertions in ITBigQueryTest.java to verify the HTTP status code and improve the flexibility of the exception message check. The review highlights a potential false positive due to the missing failure trigger in the try-catch block and suggests narrowing the assertion condition to be more specific to the expected error.

…hJobId

This PR fixes a flaky integration test by replacing a strict string assertion
on a backend error message with a more robust assertion on the HTTP status
code (400 Bad Request).

It also refactors the test to use JUnit's \`assertThrows\` for cleaner and
more idiomatic exception testing, automatically preventing false positives
if the exception isn't thrown.

Fixes #12135
@jinseopkim0 jinseopkim0 requested a review from lqiu96 April 3, 2026 22:11
@jinseopkim0 jinseopkim0 merged commit 4cb170d into main Apr 3, 2026
113 of 114 checks passed
@jinseopkim0 jinseopkim0 deleted the flaky_1 branch April 3, 2026 22:55
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.

[java-bigquery] bigquery.it.ITNightlyBigQueryTest: testProjectIDFastSQLQueryWithJobId failed

2 participants