Commit a03b295
committed
test(bigquery): Fix flaky ITBigQueryTest#testProjectIDFastSQLQueryWithJobId
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 #121351 parent 52e041a commit a03b295
File tree
1 file changed
+4
-7
lines changed- java-bigquery/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/it
1 file changed
+4
-7
lines changedjava-bigquery/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/it/ITBigQueryTest.java
Lines changed: 4 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4698 | 4698 | | |
4699 | 4699 | | |
4700 | 4700 | | |
4701 | | - | |
4702 | | - | |
4703 | | - | |
4704 | | - | |
4705 | | - | |
4706 | | - | |
4707 | | - | |
| 4701 | + | |
| 4702 | + | |
| 4703 | + | |
| 4704 | + | |
4708 | 4705 | | |
4709 | 4706 | | |
4710 | 4707 | | |
| |||
0 commit comments