nastra commented on code in PR #9862:
URL: https://github.com/apache/iceberg/pull/9862#discussion_r1519457567


##########
data/src/test/java/org/apache/iceberg/io/TestTaskEqualityDeltaWriter.java:
##########
@@ -290,38 +294,38 @@ public void testUpsertData() throws IOException {
 
     // Commit the 2nd transaction.
     result = deltaWriter.complete();
-    Assert.assertEquals(1, result.dataFiles().length);
-    Assert.assertEquals(2, result.deleteFiles().length);
+    assertThat(result.dataFiles()).hasSize(1);
+    assertThat(result.deleteFiles()).hasSize(2);
     commitTransaction(result);
 
-    Assert.assertEquals(
-        "Should have expected records",
-        expectedRowSet(ImmutableList.of(createRecord(6, "aaa"), 
createRecord(7, "ccc"))),
-        actualRowSet("*"));
+    assertThat(actualRowSet("*"))
+        .as("Should have expected records")
+        .isEqualTo(
+            expectedRowSet(ImmutableList.of(createRecord(6, "aaa"), 
createRecord(7, "ccc"))));
 
     // Check records in the data file.
     DataFile dataFile = result.dataFiles()[0];
-    Assert.assertEquals(
-        ImmutableList.of(createRecord(5, "aaa"), createRecord(6, "aaa"), 
createRecord(7, "ccc")),
-        readRecordsAsList(table.schema(), dataFile.path()));
+    assertThat(readRecordsAsList(table.schema(), dataFile.path()))
+        .isEqualTo(
+            ImmutableList.of(
+                createRecord(5, "aaa"), createRecord(6, "aaa"), 
createRecord(7, "ccc")));
 
     // Check records in the eq-delete file.
     DeleteFile eqDeleteFile = result.deleteFiles()[0];
-    Assert.assertEquals(FileContent.EQUALITY_DELETES, eqDeleteFile.content());
-    Assert.assertEquals(
-        ImmutableList.of(keyFunc.apply("aaa"), keyFunc.apply("ccc"), 
keyFunc.apply("bbb")),
-        readRecordsAsList(eqDeleteRowSchema, eqDeleteFile.path()));
+    assertThat(eqDeleteFile.content()).isEqualTo(FileContent.EQUALITY_DELETES);
+    assertThat(readRecordsAsList(eqDeleteRowSchema, eqDeleteFile.path()))
+        .isEqualTo(
+            ImmutableList.of(keyFunc.apply("aaa"), keyFunc.apply("ccc"), 
keyFunc.apply("bbb")));
 
     // Check records in the pos-delete file.
     DeleteFile posDeleteFile = result.deleteFiles()[1];
     Schema posDeleteSchema = DeleteSchemaUtil.pathPosSchema();
-    Assert.assertEquals(FileContent.POSITION_DELETES, posDeleteFile.content());
-    Assert.assertEquals(
-        ImmutableList.of(posRecord.copy("file_path", dataFile.path(), "pos", 
0L)),
-        readRecordsAsList(posDeleteSchema, posDeleteFile.path()));
+    
assertThat(FileContent.POSITION_DELETES).isEqualTo(posDeleteFile.content());

Review Comment:
   actual/expected is the wrong way 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: [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]

Reply via email to