samredai commented on a change in pull request #3252:
URL: https://github.com/apache/iceberg/pull/3252#discussion_r725495345
##########
File path:
hive-metastore/src/test/java/org/apache/iceberg/hive/TestHiveCatalog.java
##########
@@ -118,6 +121,36 @@ public void testCreateTableWithCaching() throws Exception {
}
}
+ @Test
+ public void testInitializeWithConfig() throws Exception {
+ Map<String, String> properties = new HashMap<>();
+ HiveCatalog catalog = new HiveCatalog();
+ catalog.setConf(conf);
+ catalog.initialize("hive", properties);
+ }
+
+ @Test
+ public void testInitializenWithConfigAndProperties() throws Exception {
+ Map<String, String> properties = new HashMap<>();
+ properties.put("uri", "");
+ properties.put("warehouse", "");
+ HiveCatalog catalog = new HiveCatalog();
+ catalog.setConf(conf);
+ catalog.initialize("hive", properties);
+ }
+
+ @Test
+ public void testInitializeWithoutConfig() throws Exception {
+ Map<String, String> properties = new HashMap<>();
+ HiveCatalog catalog = new HiveCatalog();
+
+ Throwable missingConfException =
Assert.assertThrows(RuntimeException.class, () -> {
+ catalog.initialize("hive", properties);
Review comment:
Perfect, I'll use that, thanks!
--
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]