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


##########
spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/SparkTestHelperBase.java:
##########
@@ -55,12 +55,15 @@ private Object[] toJava(Row row) {
 
   protected void assertEquals(
       String context, List<Object[]> expectedRows, List<Object[]> actualRows) {
-    Assert.assertEquals(
-        context + ": number of results should match", expectedRows.size(), 
actualRows.size());
+    Assertions.assertThat(actualRows.size())
+        .as(context + ": number of results should match")
+        .isEqualTo(expectedRows.size());
     for (int row = 0; row < expectedRows.size(); row += 1) {
       Object[] expected = expectedRows.get(row);
       Object[] actual = actualRows.get(row);
-      Assert.assertEquals("Number of columns should match", expected.length, 
actual.length);
+      Assertions.assertThat(actual.length)

Review Comment:
   for the same reason that I mentioned above, it's better to have 
`Assertions.assertThat(actual).as("Number of columns should 
match").hasSameSizeAs(expected);`
   
   



##########
spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/SparkTestHelperBase.java:
##########
@@ -69,19 +72,25 @@ protected void assertEquals(
   }
 
   protected void assertEquals(String context, Object[] expectedRow, Object[] 
actualRow) {
-    Assert.assertEquals("Number of columns should match", expectedRow.length, 
actualRow.length);
+    Assertions.assertThat(actualRow.length)

Review Comment:
   same as above



-- 
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

Reply via email to