nastra commented on code in PR #9711: URL: https://github.com/apache/iceberg/pull/9711#discussion_r1485814843
########## mr/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergStorageHandlerNoScan.java: ########## @@ -779,38 +771,35 @@ public void testIcebergAndHmsTableProperties() throws Exception { if (HiveVersion.min(HiveVersion.HIVE_3)) { expectedIcebergProperties.put("bucketing_version", "2"); } - Assert.assertEquals(expectedIcebergProperties, icebergTable.properties()); + assertThat(icebergTable.properties()).isEqualTo((expectedIcebergProperties)); if (Catalogs.hiveCatalog(shell.getHiveConf(), tableProperties)) { - Assert.assertEquals(14, hmsParams.size()); - Assert.assertEquals("initial_val", hmsParams.get("custom_property")); - Assert.assertEquals("TRUE", hmsParams.get(InputFormatConfig.EXTERNAL_TABLE_PURGE)); - Assert.assertEquals("TRUE", hmsParams.get("EXTERNAL")); - Assert.assertEquals("true", hmsParams.get(TableProperties.ENGINE_HIVE_ENABLED)); - Assert.assertEquals( - HiveIcebergStorageHandler.class.getName(), - hmsParams.get(hive_metastoreConstants.META_TABLE_STORAGE)); - Assert.assertEquals( - BaseMetastoreTableOperations.ICEBERG_TABLE_TYPE_VALUE.toUpperCase(), - hmsParams.get(BaseMetastoreTableOperations.TABLE_TYPE_PROP)); - Assert.assertEquals( - hmsParams.get(BaseMetastoreTableOperations.METADATA_LOCATION_PROP), - getCurrentSnapshotForHiveCatalogTable(icebergTable)); - Assert.assertNull( - hmsParams.get(BaseMetastoreTableOperations.PREVIOUS_METADATA_LOCATION_PROP)); - Assert.assertNotNull(hmsParams.get(hive_metastoreConstants.DDL_TIME)); - Assert.assertNotNull(hmsParams.get(InputFormatConfig.PARTITION_SPEC)); + assertThat(hmsParams).hasSize(14); + assertThat(hmsParams.get("custom_property")).isEqualTo("initial_val"); Review Comment: ```suggestion assertThat(hmsParams).containsEntry("custom_property", "initial_val"); ``` please also adjust the others as well. The advantage of using `containsEntry()` is that it will print the content of the map if the assertion ever fails -- 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