Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,7 @@ public Connection connect(String url, Properties info) throws SQLException {
this.toString()));
return connection;
} else {
throw new IllegalArgumentException(
"Invalid URL provided, must start with \"jdbc:bigquery:\"");
return null;
}
} catch (IOException e) {
LOG.warning("Getting a warning: " + e.getMessage());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
package com.google.cloud.bigquery.jdbc;

import static com.google.common.truth.Truth.assertThat;
import static org.junit.Assert.assertThrows;

import java.sql.Connection;
import java.sql.DriverPropertyInfo;
Expand All @@ -36,8 +35,8 @@ public void setUp() {
}

@Test
public void testInvalidURLDoesNotConnect() {
assertThrows(IllegalArgumentException.class, () -> bigQueryDriver.connect("badURL.com", null));
public void testInvalidURLReturnsNull() throws SQLException {
assertThat(bigQueryDriver.connect("badURL.com", null)).isNull();
}

@Test
Expand Down
Loading