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


##########
data/src/test/java/org/apache/iceberg/data/TestLocalScan.java:
##########
@@ -266,12 +254,15 @@ public void testRandomData() throws IOException {
     append.commit();
 
     Set<Record> records = Sets.newHashSet(IcebergGenerics.read(table).build());
-    Assert.assertEquals(
-        "Should produce correct number of records", expected.size(), 
records.size());
-    Assert.assertEquals("Random record set should match", 
Sets.newHashSet(expected), records);
+    Assertions.assertThat(expected)
+        .hasSize(records.size())
+        .as("Should produce correct number of records");

Review Comment:
   `.as(..)` needs to come before the final assertion. Also the check should be 
`assertThat(records).as(..).hasSameSizeAs(expected)`



##########
data/src/test/java/org/apache/iceberg/data/TestLocalScan.java:
##########
@@ -266,12 +254,15 @@ public void testRandomData() throws IOException {
     append.commit();
 
     Set<Record> records = Sets.newHashSet(IcebergGenerics.read(table).build());
-    Assert.assertEquals(
-        "Should produce correct number of records", expected.size(), 
records.size());
-    Assert.assertEquals("Random record set should match", 
Sets.newHashSet(expected), records);
+    Assertions.assertThat(expected)
+        .hasSize(records.size())
+        .as("Should produce correct number of records");
+    Assertions.assertThat(records)
+        .isEqualTo(Sets.newHashSet(expected))
+        .as("Random record set should match");

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