tomtongue commented on code in PR #9892:
URL: https://github.com/apache/iceberg/pull/9892#discussion_r1517865244
##########
core/src/test/java/org/apache/iceberg/TestSnapshotJson.java:
##########
@@ -49,12 +50,23 @@ public void testJsonConversion() throws IOException {
String json = SnapshotParser.toJson(expected);
Snapshot snapshot = SnapshotParser.fromJson(json);
- Assert.assertEquals("Snapshot ID should match", expected.snapshotId(),
snapshot.snapshotId());
- Assert.assertEquals(
- "Files should match", expected.allManifests(ops.io()),
snapshot.allManifests(ops.io()));
- Assert.assertNull("Operation should be null", snapshot.operation());
- Assert.assertNull("Summary should be null", snapshot.summary());
- Assert.assertEquals("Schema ID should match", Integer.valueOf(1),
snapshot.schemaId());
+ assertThat(snapshot.snapshotId()).isEqualTo(expected.snapshotId());
+ assertThat(snapshot.allManifests(ops.io())).hasSize(2);
+
+ for (int i = 0; i < snapshot.allManifests(ops.io()).size(); i++) {
Review Comment:
@nastra I tried to check each element in the manifest list, but it's a bit
redundant. I believe it's enough to check with `isEqualTo` between two lists.
Let me fix this part and other part like this.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]