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


##########
core/src/test/java/org/apache/iceberg/TestEntriesMetadataTable.java:
##########
@@ -68,20 +63,19 @@ public void testEntriesTableScan() {
     Schema expectedSchema =
         TypeUtil.join(readSchema, 
MetricsUtil.readableMetricsSchema(table.schema(), readSchema));
 
-    assertEquals(
-        "A tableScan.select() should prune the schema",
-        expectedSchema.asStruct(),
-        scan.schema().asStruct());
+    assertThat(scan.schema().asStruct())
+        .as("A tableScan.select() should prune the schema")
+        .isEqualTo(expectedSchema.asStruct());
 
     FileScanTask file = Iterables.getOnlyElement(scan.planFiles());
-    Assert.assertEquals(
-        "Data file should be the table's manifest",
-        
Iterables.getOnlyElement(table.currentSnapshot().allManifests(table.io())).path(),
-        file.file().path());
-    Assert.assertEquals("Should contain 2 data file records", 2, 
file.file().recordCount());
+    assertThat(file.file().path())
+        .as("Data file should be the table's manifest")
+        .isEqualTo(
+            
Iterables.getOnlyElement(table.currentSnapshot().allManifests(table.io())).path());

Review Comment:
   can we express this check without using `Iterables`?



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