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


##########
core/src/test/java/org/apache/iceberg/catalog/CatalogTests.java:
##########
@@ -1478,33 +1527,39 @@ public void testCompleteCreateTransaction() {
             .withProperties(properties)
             .createTransaction();
 
-    Assert.assertFalse(
-        "Table should not exist after createTransaction", 
catalog.tableExists(TABLE));
+    Assertions.assertThat(catalog.tableExists(TABLE))
+        .as("Table should not exist after createTransaction")
+        .isFalse();
 
     create.newFastAppend().appendFile(FILE_A).commit();
 
-    Assert.assertFalse("Table should not exist after append commit", 
catalog.tableExists(TABLE));
+    Assertions.assertThat(catalog.tableExists(TABLE))
+        .as("Table should not exist after append commit")
+        .isFalse();
 
     create.commitTransaction();
 
-    Assert.assertTrue("Table should exist after append commit", 
catalog.tableExists(TABLE));
-    Table table = catalog.loadTable(TABLE);
+    Assertions.assertThat(catalog.tableExists(TABLE))
+        .as("Table should exist after append commit")
+        .isTrue();
 
-    Assert.assertEquals(
-        "Table schema should match the new schema",
-        TABLE_SCHEMA.asStruct(),
-        table.schema().asStruct());
-    Assert.assertEquals(
-        "Table should have create partition spec", TABLE_SPEC.fields(), 
table.spec().fields());
-    Assert.assertEquals(
-        "Table should have create sort order", TABLE_WRITE_ORDER, 
table.sortOrder());
-    Assert.assertEquals(
-        "Table properties should be a superset of the requested properties",
-        properties.entrySet(),
-        Sets.intersection(properties.entrySet(), 
table.properties().entrySet()));
+    Table table = catalog.loadTable(TABLE);
+    Assertions.assertThat(table.schema().asStruct())
+        .as("Table schema should match the new schema")
+        .isEqualTo(TABLE_SCHEMA.asStruct());
+    Assertions.assertThat(table.spec().fields())
+        .as("Table should have create partition spec")
+        .isEqualTo(TABLE_SPEC.fields());
+    Assertions.assertThat(table.sortOrder())
+        .as("Table should have create sort order")
+        .isEqualTo(TABLE_WRITE_ORDER);
+    Assertions.assertThat(table.properties().entrySet())
+        .as("Table properties should be a superset of the requested 
properties")
+        .containsAll(properties.entrySet());

Review Comment:
   `containsExactlyInAnyOrder` should be used 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: [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