Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.

Commit 6f3bbe1

Browse files
committed
chore: assert only on matching partition table
1 parent 91cead9 commit 6f3bbe1

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

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

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2679,7 +2679,6 @@ void testListTablesWithRangePartitioning() {
26792679
assertNotNull(createdRangePartitioningTable);
26802680
try {
26812681
Page<Table> tables = bigquery.listTables(DATASET);
2682-
boolean found = false;
26832682
for (Table table : tables.getValues()) {
26842683
// Look for the table that matches the newly partitioned table. Other tables in the
26852684
// dataset may not be partitioned and cannot match to them.
@@ -2693,14 +2692,10 @@ void testListTablesWithRangePartitioning() {
26932692
StandardTableDefinition standardTableDefinition = table.getDefinition();
26942693
RangePartitioning rangePartitioning = standardTableDefinition.getRangePartitioning();
26952694
assertNotNull(rangePartitioning);
2696-
if (RANGE_PARTITIONING.equals(rangePartitioning)) {
2697-
assertEquals(RANGE, rangePartitioning.getRange());
2698-
assertEquals("IntegerField", rangePartitioning.getField());
2699-
found = true;
2700-
break;
2701-
}
2695+
assertEquals(RANGE_PARTITIONING, rangePartitioning);
2696+
assertEquals(RANGE, rangePartitioning.getRange());
2697+
assertEquals("IntegerField", rangePartitioning.getField());
27022698
}
2703-
assertTrue(found);
27042699
} finally {
27052700
createdRangePartitioningTable.delete();
27062701
}

0 commit comments

Comments
 (0)