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


##########
data/src/test/java/org/apache/iceberg/TestMergingMetrics.java:
##########
@@ -192,16 +187,16 @@ public void verifyRandomlyGeneratedRecordsMetric() throws 
Exception {
         .map(Types.NestedField::fieldId)
         .forEach(
             id ->
-                Assert.assertNull(
-                    "NaN count for field %s should be null", 
metrics.nanValueCounts().get(id)));
+                assertThat(metrics.nanValueCounts().get(id))
+                    .as("NaN count for field %s should be null")
+                    .isNull());
   }
 
   private void assertNaNCountMatch(
       Long expected, Map<Integer, Long> nanValueCount, Types.NestedField 
field) {
-    Assert.assertEquals(
-        String.format("NaN count for field %s does not match expected", 
field.name()),
-        expected,
-        nanValueCount.get(FIELDS_WITH_NAN_COUNT_TO_ID.get(field)));
+    assertThat(nanValueCount.get(FIELDS_WITH_NAN_COUNT_TO_ID.get(field)))

Review Comment:
   since this is checking something in a map it would be better to adjust this 
to `assertThat(nanValueCount).containsEntry(..., expected)`



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