-
Notifications
You must be signed in to change notification settings - Fork 1.1k
chore(bigquery-jdbc): update integration tests to handle different cancellation #13541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -334,8 +334,9 @@ public void testSetTimeout() throws SQLException { | |
| try { | ||
| statement.executeQuery(selectQuery); | ||
| } catch (SQLException e) { | ||
| assertTrue(true); | ||
| assertEquals("SQL execution canceled", e.getMessage()); | ||
| assertEquals( | ||
| "BigQueryException during runQuery\nJob execution was cancelled: Job timed out", | ||
| e.getMessage()); | ||
| } | ||
|
Comment on lines
334
to
340
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using a try-catch block without an explicit fail statement means that if SQLException e =
assertThrows(SQLException.class, () -> statement.executeQuery(selectQuery));
assertEquals("BigQueryException during runQuery\nJob execution was cancelled: Job timed out", e.getMessage()); |
||
| statement.close(); | ||
| connection.close(); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
System.out.printlnstatement appears to be a leftover debugging aid. It should be removed to keep the test output clean.