Skip to content

Commit c46deaa

Browse files
committed
fix unit test
1 parent bf2c4a2 commit c46deaa

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/BigQueryImplTest.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,6 @@ public void testGetDatasetNotFoundWhenThrowIsDisabled() throws IOException {
623623
public void testGetDatasetNotFoundWhenThrowIsEnabled() throws IOException {
624624
when(bigqueryRpcMock.getDatasetSkipExceptionTranslation(
625625
PROJECT, "dataset-not-found", EMPTY_RPC_OPTIONS))
626-
.thenReturn(null)
627626
.thenThrow(new BigQueryException(404, "Dataset not found"));
628627
options.setThrowNotFound(true);
629628
bigquery = options.getService();
@@ -975,7 +974,6 @@ public void testGetTableNotFoundWhenThrowIsDisabled() throws IOException {
975974
public void testGetTableNotFoundWhenThrowIsEnabled() throws IOException {
976975
when(bigqueryRpcMock.getTableSkipExceptionTranslation(
977976
PROJECT, DATASET, "table-not-found", EMPTY_RPC_OPTIONS))
978-
.thenReturn(null)
979977
.thenThrow(new BigQueryException(404, "Table not found"));
980978
options.setThrowNotFound(true);
981979
bigquery = options.getService();
@@ -3073,12 +3071,11 @@ public void testGetRoutineWithRountineId() throws IOException {
30733071
public void testGetRoutineWithEnabledThrowNotFoundException() throws IOException {
30743072
when(bigqueryRpcMock.getRoutineSkipExceptionTranslation(
30753073
PROJECT, DATASET, ROUTINE, EMPTY_RPC_OPTIONS))
3076-
.thenReturn(null)
30773074
.thenThrow(new BigQueryException(404, "Routine not found"));
30783075
options.setThrowNotFound(true);
30793076
bigquery = options.getService();
30803077
try {
3081-
Routine routine = bigquery.getRoutine(ROUTINE_ID);
3078+
bigquery.getRoutine(ROUTINE_ID);
30823079
fail();
30833080
} catch (BigQueryException ex) {
30843081
assertEquals("Routine not found", ex.getMessage());

0 commit comments

Comments
 (0)