lisirrx commented on code in PR #9711:
URL: https://github.com/apache/iceberg/pull/9711#discussion_r1487564926


##########
mr/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergStorageHandlerNoScan.java:
##########
@@ -827,30 +821,29 @@ public void testIcebergAndHmsTableProperties() throws 
Exception {
             .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
 
     if (Catalogs.hiveCatalog(shell.getHiveConf(), tableProperties)) {
-      // 2 newly-added properties + previous_metadata_location prop + explicit 
Parquet compression
-      Assert.assertEquals(17, hmsParams.size());
-      Assert.assertEquals("true", hmsParams.get("new_prop_1"));
-      Assert.assertEquals("false", hmsParams.get("new_prop_2"));
-      Assert.assertEquals("new_val", hmsParams.get("custom_property"));
+      assertThat(hmsParams).hasSize(17);
+      assertThat(hmsParams).containsEntry("new_prop_1", "true");
+      assertThat(hmsParams).containsEntry("new_prop_2", "false");
+      assertThat(hmsParams).containsEntry("custom_property", "new_val");
       String prevSnapshot = 
getCurrentSnapshotForHiveCatalogTable(icebergTable);
       icebergTable.refresh();
       String newSnapshot = getCurrentSnapshotForHiveCatalogTable(icebergTable);
-      Assert.assertEquals(
-          
hmsParams.get(BaseMetastoreTableOperations.PREVIOUS_METADATA_LOCATION_PROP),
-          prevSnapshot);
-      Assert.assertEquals(
-          hmsParams.get(BaseMetastoreTableOperations.METADATA_LOCATION_PROP), 
newSnapshot);
+      assertThat(hmsParams)
+          .containsEntry(
+              BaseMetastoreTableOperations.PREVIOUS_METADATA_LOCATION_PROP, 
prevSnapshot);
+      assertThat(hmsParams)
+          .containsEntry(BaseMetastoreTableOperations.METADATA_LOCATION_PROP, 
newSnapshot);
     } else {
-      Assert.assertEquals(8, hmsParams.size());
+      assertThat(hmsParams).hasSize(8);
     }
 
     // Remove some Iceberg props and see if they're removed from HMS table 
props as well
     if (Catalogs.hiveCatalog(shell.getHiveConf(), tableProperties)) {
       
icebergTable.updateProperties().remove("custom_property").remove("new_prop_1").commit();
       hmsParams = shell.metastore().getTable("default", 
"customers").getParameters();
-      Assert.assertFalse(hmsParams.containsKey("custom_property"));
-      Assert.assertFalse(hmsParams.containsKey("new_prop_1"));
-      Assert.assertTrue(hmsParams.containsKey("new_prop_2"));
+      assertThat(hmsParams).doesNotContainKey("custom_property");

Review Comment:
   oh, thanks, you teach me something new! I'll fix them.



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