Skip to content

Commit 8cd28cd

Browse files
committed
chore: Add logic to check if table is found
1 parent 6f3bbe1 commit 8cd28cd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/it/ITBigQueryTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2679,6 +2679,7 @@ void testListTablesWithRangePartitioning() {
26792679
assertNotNull(createdRangePartitioningTable);
26802680
try {
26812681
Page<Table> tables = bigquery.listTables(DATASET);
2682+
boolean found = false;
26822683
for (Table table : tables.getValues()) {
26832684
// Look for the table that matches the newly partitioned table. Other tables in the
26842685
// dataset may not be partitioned and cannot match to them.
@@ -2695,7 +2696,10 @@ void testListTablesWithRangePartitioning() {
26952696
assertEquals(RANGE_PARTITIONING, rangePartitioning);
26962697
assertEquals(RANGE, rangePartitioning.getRange());
26972698
assertEquals("IntegerField", rangePartitioning.getField());
2699+
found = true;
2700+
break;
26982701
}
2702+
assertTrue(found, "Created range partitioned table was not found in the dataset list.");
26992703
} finally {
27002704
createdRangePartitioningTable.delete();
27012705
}

0 commit comments

Comments
 (0)