FANNG1 commented on code in PR #4563: URL: https://github.com/apache/gravitino/pull/4563#discussion_r1721300638
########## iceberg/iceberg-common/src/test/java/org/apache/gravitino/iceberg/common/utils/TestIcebergCatalogUtil.java: ########## @@ -78,4 +78,52 @@ void testLoadCatalog() { IcebergCatalogUtil.loadCatalogBackend("other"); }); } + + @Test + void testValidLoadCustomCatalog() { + Catalog catalog; + Map<String, String> config = new HashMap<>(); + + config.put("catalog-backend-impl", "org.apache.iceberg.inmemory.InMemoryCatalog"); + catalog = + IcebergCatalogUtil.loadCatalogBackend( + IcebergCatalogBackend.valueOf("CUSTOM"), new IcebergConfig(config)); + Assertions.assertTrue(catalog instanceof InMemoryCatalog); + + config.clear(); + config.put("catalog-backend-impl", "org.apache.iceberg.hive.HiveCatalog"); + catalog = + IcebergCatalogUtil.loadCatalogBackend( + IcebergCatalogBackend.valueOf("CUSTOM"), new IcebergConfig(config)); + Assertions.assertTrue(catalog instanceof HiveCatalog); + + config.clear(); + config.put( + "catalog-backend-impl", "org.apache.gravitino.iceberg.common.utils.CustomCatalogForTest"); Review Comment: seems use `org.apache.gravitino.iceberg.common.utils.CustomCatalogForTest` is enough, no need to test `memory` or `hive`? -- 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: commits-unsubscr...@gravitino.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org