diff --git a/google-cloud-clients/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/BigQueryImplTest.java b/google-cloud-clients/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/BigQueryImplTest.java index 327ecf6fc892..24cc6a09f0c9 100644 --- a/google-cloud-clients/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/BigQueryImplTest.java +++ b/google-cloud-clients/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/BigQueryImplTest.java @@ -979,7 +979,7 @@ public void testDeleteTable() { EasyMock.expect(bigqueryRpcMock.deleteTable(PROJECT, DATASET, TABLE)).andReturn(true); EasyMock.replay(bigqueryRpcMock); bigquery = options.getService(); - assertTrue(bigquery.delete(DATASET, TABLE)); + assertTrue(bigquery.delete(TABLE_ID)); } @Test diff --git a/google-cloud-clients/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/JobTest.java b/google-cloud-clients/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/JobTest.java index b259b237ea78..c36fda6b4c41 100644 --- a/google-cloud-clients/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/JobTest.java +++ b/google-cloud-clients/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/JobTest.java @@ -297,7 +297,7 @@ public Iterable getValues() { replay(status, bigquery, mockOptions); initializeJob(jobInfo); - assertThat(job.waitFor(TEST_RETRY_OPTIONS)).isSameAs(completedJob); + assertThat(job.waitFor(TEST_RETRY_OPTIONS)).isSameInstanceAs(completedJob); assertThat(job.getQueryResults().iterateAll()).isEmpty(); verify(status, mockOptions); } @@ -345,7 +345,7 @@ public void testWaitForAndGetQueryResultsEmptyWithSchema() throws InterruptedExc replay(status, bigquery, mockOptions); initializeJob(jobInfo); - assertThat(job.waitFor(TEST_RETRY_OPTIONS)).isSameAs(completedJob); + assertThat(job.waitFor(TEST_RETRY_OPTIONS)).isSameInstanceAs(completedJob); assertThat(job.getQueryResults().getSchema()) .isEqualTo(Schema.of(Field.of("field1", LegacySQLTypeName.BOOLEAN))); verify(status, mockOptions); @@ -424,7 +424,7 @@ public Iterable getValues() { replay(status, bigquery, mockOptions); initializeJob(jobInfo); - assertThat(job.waitFor(TEST_RETRY_OPTIONS)).isSameAs(completedJob); + assertThat(job.waitFor(TEST_RETRY_OPTIONS)).isSameInstanceAs(completedJob); assertThat(job.getQueryResults().iterateAll()).hasSize(0); verify(status, mockOptions); } diff --git a/google-cloud-clients/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/it/ITBigQueryTest.java b/google-cloud-clients/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/it/ITBigQueryTest.java index 9305f75478eb..f2feffbaad73 100644 --- a/google-cloud-clients/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/it/ITBigQueryTest.java +++ b/google-cloud-clients/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/it/ITBigQueryTest.java @@ -676,7 +676,7 @@ public void testListPartitions() throws InterruptedException { List partitions = bigquery.listPartitions(TableId.of(DATASET, tableName)); assertEquals(1, partitions.size()); } finally { - bigquery.delete(DATASET, tableName); + bigquery.delete(tableId); } } @@ -806,7 +806,7 @@ public void testUpdateNonExistingTable() { @Test public void testDeleteNonExistingTable() { - assertFalse(bigquery.delete(DATASET, "test_delete_non_existing_table")); + assertFalse(bigquery.delete("test_delete_non_existing_table")); } @Test @@ -1280,7 +1280,7 @@ public void testCreateAndGetJob() throws InterruptedException, TimeoutException assertNotNull(completedJob); assertNull(completedJob.getStatus().getError()); - assertTrue(bigquery.delete(DATASET, destinationTableName)); + assertTrue(bigquery.delete(destinationTable)); } @Test @@ -1330,7 +1330,7 @@ public void testCreateAndGetJobWithSelectedFields() RetryOption.totalTimeout(Duration.ofMinutes(1))); assertNotNull(completedJob); assertNull(completedJob.getStatus().getError()); - assertTrue(bigquery.delete(DATASET, destinationTableName)); + assertTrue(bigquery.delete(destinationTable)); } @Test @@ -1388,7 +1388,7 @@ public void testQueryJob() throws InterruptedException, TimeoutException { rowCount++; } assertEquals(2, rowCount); - assertTrue(bigquery.delete(DATASET, tableName)); + assertTrue(bigquery.delete(destinationTable)); Job queryJob = bigquery.getJob(remoteJob.getJobId()); JobStatistics.QueryStatistics statistics = queryJob.getStatistics(); assertNotNull(statistics.getQueryPlan()); @@ -1435,7 +1435,7 @@ public void testExtractJob() throws InterruptedException, TimeoutException { new String(storage.readAllBytes(BUCKET, EXTRACT_FILE), StandardCharsets.UTF_8); assertEquals( Sets.newHashSet(CSV_CONTENT.split("\n")), Sets.newHashSet(extractedCsv.split("\n"))); - assertTrue(bigquery.delete(DATASET, tableName)); + assertTrue(bigquery.delete(destinationTable)); } @Test @@ -1532,7 +1532,7 @@ public void testInsertFromFile() throws InterruptedException, IOException, Timeo rowCount++; } assertEquals(2, rowCount); - assertTrue(bigquery.delete(DATASET, destinationTableName)); + assertTrue(bigquery.delete(tableId)); } @Test