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


##########
spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/sql/TestCreateTable.java:
##########
@@ -289,22 +312,25 @@ public void testCreateTableProperties() {
         tableName);
 
     Table table = validationCatalog.loadTable(tableIdent);
-    Assert.assertNotNull("Should load the new table", table);
+    assertThat(table).as("Should load the new table").isNotNull();
 
     StructType expectedSchema =
         StructType.of(
             NestedField.required(1, "id", Types.LongType.get()),
             NestedField.optional(2, "data", Types.StringType.get()));
-    Assert.assertEquals(
-        "Should have the expected schema", expectedSchema, 
table.schema().asStruct());
-    Assert.assertEquals("Should not be partitioned", 0, 
table.spec().fields().size());
-    Assert.assertEquals("Should have property p1", "2", 
table.properties().get("p1"));
-    Assert.assertEquals("Should have property p2", "x", 
table.properties().get("p2"));
+    assertThat(table.schema().asStruct())
+        .as("Should have the expected schema")
+        .isEqualTo(expectedSchema);
+    assertThat(table.spec().fields()).as("Should not be 
partitioned").hasSize(0);
+    assertThat(table.properties().get("p1")).as("Should have property 
p1").isEqualTo("2");

Review Comment:
   please use `.containsEntry(..).containsEntry(..)` here. I don't think we 
need the `as(..)` as it's self-explanatory here



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