use of com.google.cloud.bigquery.BigQuerySQLException in project java-bigquery by googleapis.
the class ITNightlyBigQueryTest method testInvalidQuery.
@Test
public void testInvalidQuery() throws BigQuerySQLException {
Connection connection = getConnection();
try {
BigQueryResult bigQueryResult = connection.executeSelect(INVALID_QUERY);
fail("BigQuerySQLException was expected");
} catch (BigQuerySQLException ex) {
assertNotNull(ex.getMessage());
assertTrue(ex.getMessage().toLowerCase().contains("unexpected keyword into"));
} finally {
connection.close();
}
}
Aggregations