nastra commented on code in PR #9994: URL: https://github.com/apache/iceberg/pull/9994#discussion_r1531685943
########## core/src/test/java/org/apache/iceberg/TestRewriteFiles.java: ########## @@ -373,24 +352,18 @@ public void testRewriteDataAndAssignOldSequenceNumber() { .rewriteFiles(ImmutableSet.of(FILE_A), ImmutableSet.of(FILE_D), oldSequenceNumber), branch); - Assert.assertEquals("Should contain 3 manifest", 3, pending.allManifests(table.io()).size()); - Assert.assertFalse( - "Should not contain data manifest from initial write", - pending.dataManifests(table.io()).stream().anyMatch(initialManifests::contains)); + assertThat(pending.allManifests(table.io())).hasSize(3); + assertThat(pending.dataManifests(table.io())).doesNotContainAnyElementsOf(initialManifests); long pendingId = pending.snapshotId(); ManifestFile newManifest = pending.allManifests(table.io()).get(0); validateManifestEntries(newManifest, ids(pendingId), files(FILE_D), statuses(ADDED)); - for (ManifestEntry<DataFile> entry : ManifestFiles.read(newManifest, FILE_IO).entries()) { - Assert.assertEquals( - "Should have old sequence number for manifest entries", - oldSequenceNumber, - (long) entry.dataSequenceNumber()); - } - Assert.assertEquals( - "Should use new sequence number for the manifest file", - oldSequenceNumber + 1, - newManifest.sequenceNumber()); + assertThat(ManifestFiles.read(newManifest, FILE_IO).entries()) + .allSatisfy( + entry -> { Review Comment: no need for the brackets here -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org