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


##########
spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestWriteMetricsConfig.java:
##########
@@ -271,28 +271,30 @@ public void testCustomMetricCollectionForNestedParquet() 
throws IOException {
       DataFile file = task.file();
 
       Map<Integer, Long> nullValueCounts = file.nullValueCounts();
-      Assert.assertEquals(3, nullValueCounts.size());
-      Assert.assertTrue(nullValueCounts.containsKey(longCol.fieldId()));
-      Assert.assertTrue(nullValueCounts.containsKey(recordId.fieldId()));
-      Assert.assertTrue(nullValueCounts.containsKey(recordData.fieldId()));
+      assertThat(nullValueCounts).hasSize(3);
+      assertThat(nullValueCounts).containsKey(longCol.fieldId());
+      assertThat(nullValueCounts).containsKey(recordId.fieldId());
+      assertThat(nullValueCounts).containsKey(recordData.fieldId());
 
       Map<Integer, Long> valueCounts = file.valueCounts();
-      Assert.assertEquals(3, valueCounts.size());
-      Assert.assertTrue(valueCounts.containsKey(longCol.fieldId()));
-      Assert.assertTrue(valueCounts.containsKey(recordId.fieldId()));
-      Assert.assertTrue(valueCounts.containsKey(recordData.fieldId()));
+      assertThat(valueCounts).hasSize(3);

Review Comment:
   these call all be combined to a more fluent call: 
`assertThat(..).hasSize(3).containsKey(..).containsKey(..).containsKey(...)`



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