File tree Expand file tree Collapse file tree
java-bigquery-jdbc/src/test/java/com/google/cloud/bigquery/jdbc/it Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3434public class ITBase extends BigQueryJdbcBaseTest {
3535
3636 // This query takes 300 seconds to complete
37- protected final String query300seconds =
37+ public static final String query300seconds =
3838 "DECLARE DELAY_TIME DATETIME; SET DELAY_TIME = DATETIME_ADD(CURRENT_DATETIME, INTERVAL 300"
3939 + " SECOND); WHILE CURRENT_DATETIME < DELAY_TIME DO END WHILE;" ;
4040
Original file line number Diff line number Diff line change @@ -221,7 +221,7 @@ public void testQueryInterruptGracefullyStopsExplicitJob()
221221 () -> {
222222 SQLException e =
223223 assertThrows (
224- SQLException .class , () -> bigQueryStatement .execute (query300seconds ));
224+ SQLException .class , () -> bigQueryStatement .execute (ITBase . query300seconds ));
225225 assertTrue (e .getMessage ().contains ("User requested cancellation" ));
226226 threadException .set (false );
227227 });
@@ -255,7 +255,7 @@ public void testQueryInterruptGracefullyStopsOptionalJob()
255255 () -> {
256256 SQLException e =
257257 assertThrows (
258- SQLException .class , () -> bigQueryStatement .execute (query300seconds ));
258+ SQLException .class , () -> bigQueryStatement .execute (ITBase . query300seconds ));
259259 assertTrue (e .getMessage ().contains ("Query was cancelled." ));
260260 threadException .set (false );
261261 });
Original file line number Diff line number Diff line change @@ -328,7 +328,7 @@ public void testSetTimeout() throws SQLException {
328328 statement .setQueryTimeout (1 );
329329 assertEquals (1 , statement .getQueryTimeout ());
330330 SQLException e =
331- assertThrows (SQLException .class , () -> statement .executeQuery (query300seconds ));
331+ assertThrows (SQLException .class , () -> statement .executeQuery (ITBase . query300seconds ));
332332 assertEquals (
333333 "BigQueryException during runQuery\n Job execution was cancelled: Job timed out" ,
334334 e .getMessage ());
You can’t perform that action at this time.
0 commit comments