Skip to content

Commit

Permalink
fix some test using new api
Browse files Browse the repository at this point in the history
  • Loading branch information
lisirrx committed Jan 4, 2024
1 parent fb4abba commit 32cc331
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions core/src/test/java/org/apache/iceberg/TestBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -399,9 +399,9 @@ void validateSnapshot(Snapshot old, Snapshot snap, Long sequenceNumber, DataFile
.isTrue();
}

Assertions.assertThat(newManifests.size())
Assertions.assertThat(newManifests)
.as("Should create 1 new manifest and reuse old manifests")
.isEqualTo(1);
.hasSize(1);
ManifestFile manifest = newManifests.get(0);

long id = snap.snapshotId();
Expand Down Expand Up @@ -542,9 +542,7 @@ void validateManifest(
}
}

Assertions.assertThat(expectedFiles.hasNext())
.as("Should find all files in the manifest")
.isFalse();
Assertions.assertThat(expectedFiles).as("Should find all files in the manifest").isExhausted();
}

void validateDeleteManifest(
Expand Down Expand Up @@ -572,9 +570,7 @@ void validateDeleteManifest(
.isEqualTo(statuses.next());
}

Assertions.assertThat(expectedFiles.hasNext())
.as("Should find all files in the manifest")
.isFalse();
Assertions.assertThat(expectedFiles).as("Should find all files in the manifest").isExhausted();
}

private <T extends ContentFile<T>> void validateManifestSequenceNumbers(
Expand Down Expand Up @@ -697,9 +693,7 @@ static void validateManifestEntries(
.isEqualTo(expectedStatus);
}

Assertions.assertThat(expectedFiles.hasNext())
.as("Should find all files in the manifest")
.isFalse();
Assertions.assertThat(expectedFiles).as("Should find all files in the manifest").isExhausted();
}

static Iterator<ManifestEntry.Status> statuses(ManifestEntry.Status... statuses) {
Expand Down

0 comments on commit 32cc331

Please sign in to comment.