File tree Expand file tree Collapse file tree 1 file changed +8
-13
lines changed
java-bigquery/google-cloud-bigquery-jdbc/src/test/java/com/google/cloud/bigquery/jdbc Expand file tree Collapse file tree 1 file changed +8
-13
lines changed Original file line number Diff line number Diff line change 1616package com .google .cloud .bigquery .jdbc ;
1717
1818import static com .google .common .truth .Truth .assertThat ;
19- import static org .junit .jupiter .api .Assertions .fail ;
2019
21- import com .google .cloud .bigquery .exception .BigQueryJdbcException ;
22- import com .google .cloud .bigquery .exception .BigQueryJdbcRuntimeException ;
2320import java .sql .Connection ;
2421import java .sql .DriverPropertyInfo ;
2522import java .sql .SQLException ;
@@ -98,15 +95,13 @@ public void testJDBCCompliantReturnsFalse() {
9895 }
9996
10097 @ Test
101- public void testConnectWithInvalidUrlChainsException () {
102- try {
103- bigQueryDriver .connect (
104- "jdbc:bigquery://https://www.googleapis.com/bigquery/v2:443;InvalidProperty=Value" ,
105- new Properties ());
106- fail ("Expected SQLException" );
107- } catch (SQLException e ) {
108- assertThat ((Throwable ) e ).isInstanceOf (BigQueryJdbcException .class );
109- assertThat (e .getCause ()).isInstanceOf (BigQueryJdbcRuntimeException .class );
110- }
98+ public void testConnectWithInvalidUrlChainsNoException () throws SQLException {
99+ Connection connection =
100+ bigQueryDriver .connect (
101+ "jdbc:bigquery://https://www.googleapis.com/bigquery/v2:443;"
102+ + "OAuthType=2;OAuthAccessToken=redactedToken;ProjectId=t;"
103+ + "InvalidProperty=Value" ,
104+ new Properties ());
105+ assertThat (connection .isClosed ()).isFalse ();
111106 }
112107}
You can’t perform that action at this time.
0 commit comments