nastra commented on code in PR #9892: URL: https://github.com/apache/iceberg/pull/9892#discussion_r1519303478
########## core/src/test/java/org/apache/iceberg/TestSnapshotJson.java: ########## @@ -149,29 +142,26 @@ public void testJsonConversionWithV1Manifests() { timestampMillis); String json = SnapshotParser.toJson(expected, true); - Assertions.assertThat(json).isEqualTo(expectedJson); + assertThat(json).isEqualTo(expectedJson); Snapshot snapshot = SnapshotParser.fromJson(json); - Assertions.assertThat(snapshot).isEqualTo(expected); - - Assert.assertEquals("Sequence number should default to 0 for v1", 0, snapshot.sequenceNumber()); - Assert.assertEquals("Snapshot ID should match", expected.snapshotId(), snapshot.snapshotId()); - Assert.assertEquals( - "Timestamp should match", expected.timestampMillis(), snapshot.timestampMillis()); - Assert.assertEquals("Parent ID should match", expected.parentId(), snapshot.parentId()); - Assert.assertEquals( - "Manifest list should match", - expected.manifestListLocation(), - snapshot.manifestListLocation()); - Assert.assertEquals( - "Files should match", expected.allManifests(ops.io()), snapshot.allManifests(ops.io())); - Assert.assertEquals("Operation should match", expected.operation(), snapshot.operation()); - Assert.assertEquals("Summary should match", expected.summary(), snapshot.summary()); - Assert.assertEquals("Schema ID should match", expected.schemaId(), snapshot.schemaId()); + assertThat(snapshot).isEqualTo(expected); + + assertThat(snapshot.sequenceNumber()) + .as("Sequence number should default to 0 for v1") + .isEqualTo(0); + assertThat(snapshot.snapshotId()).isEqualTo(expected.snapshotId()); + assertThat(snapshot.timestampMillis()).isEqualTo(expected.timestampMillis()); + assertThat(snapshot.parentId()).isEqualTo(expected.parentId()); + assertThat(snapshot.manifestListLocation()).isEqualTo(expected.manifestListLocation()); + assertThat(snapshot.allManifests(ops.io())).isEqualTo(expected.allManifests(ops.io())); + assertThat(snapshot.operation()).isEqualTo(expected.operation()); + assertThat(snapshot.summary()).isEqualTo(expected.summary()); + assertThat(snapshot.schemaId()).isEqualTo(expected.schemaId()); } private String createManifestListWithManifestFiles(long snapshotId, Long parentSnapshotId) throws IOException { - File manifestList = temp.newFile("manifests" + UUID.randomUUID()); + File manifestList = File.createTempFile("junit", null, temp.toFile()); Review Comment: ```suggestion File manifestList = File.createTempFile("manifests", null, temp.toFile()); ``` ########## core/src/test/java/org/apache/iceberg/TestTableMetadata.java: ########## @@ -1731,7 +1730,7 @@ public void testNoTrailingLocationSlash() { private String createManifestListWithManifestFile( long snapshotId, Long parentSnapshotId, String manifestFile) throws IOException { - File manifestList = temp.newFile("manifests" + UUID.randomUUID()); + File manifestList = File.createTempFile("junit", null, temp.toFile()); Review Comment: ```suggestion File manifestList = File.createTempFile("manifests", null, temp.toFile()); ``` -- 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