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


##########
core/src/test/java/org/apache/iceberg/avro/TestReadProjection.java:
##########
@@ -329,50 +346,57 @@ public void testMapOfStructsProjection() throws 
IOException {
     Schema idOnly = new Schema(Types.NestedField.required(0, "id", 
Types.LongType.get()));
 
     Record projected = writeAndRead("id_only", writeSchema, idOnly, record);
-    Assert.assertEquals("Should contain the correct id value", 34L, (long) 
projected.get("id"));
+    Assertions.assertThat((long) projected.get("id"))
+        .as("Should contain the correct id value")
+        .isEqualTo(34L);
     assertEmptyAvroField(projected, "locations");
 
     projected = writeAndRead("all_locations", writeSchema, 
writeSchema.select("locations"), record);
     assertEmptyAvroField(projected, "id");
-    Assert.assertEquals(
-        "Should project locations map",
-        record.get("locations"),
-        toStringMap((Map) projected.get("locations")));
+    Assertions.assertThat(toStringMap((Map) projected.get("locations")))
+        .as("Should project locations map")
+        .isEqualTo(record.get("locations"));
 
     projected = writeAndRead("lat_only", writeSchema, 
writeSchema.select("locations.lat"), record);
     assertEmptyAvroField(projected, "id");
     Map<String, ?> locations = toStringMap((Map) projected.get("locations"));
-    Assert.assertNotNull("Should project locations map", locations);
-    Assert.assertEquals(
-        "Should contain L1 and L2", Sets.newHashSet("L1", "L2"), 
locations.keySet());
+    Assertions.assertThat(locations).as("Should project locations 
map").isNotNull();
+    Assertions.assertThat(locations.keySet())
+        .as("Should contain L1 and L2")
+        .isEqualTo(Sets.newHashSet("L1", "L2"));

Review Comment:
   .containsExactly("L1", "L2")
   



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