pvary commented on code in PR #5036:
URL: https://github.com/apache/iceberg/pull/5036#discussion_r924147645


##########
hive-metastore/src/test/java/org/apache/iceberg/hive/HiveMetastoreTest.java:
##########
@@ -42,9 +44,21 @@ public abstract class HiveMetastoreTest {
 
   @BeforeClass
   public static void startMetastore() throws Exception {
+    startMetastore(Collections.emptyMap());
+  }
+  public static void startMetastore(Map<String, String> hiveConfOverride) 
throws Exception {
     HiveMetastoreTest.metastore = new TestHiveMetastore();
-    metastore.start();
-    HiveMetastoreTest.hiveConf = metastore.hiveConf();
+    if (HiveMetastoreTest.hiveConf != null) {
+      if (hiveConfOverride != null) {
+        for (Map.Entry<String, String> kv : hiveConfOverride.entrySet()) {
+          hiveConf.set(kv.getKey(), kv.getValue());
+        }
+      }
+      metastore.start(HiveMetastoreTest.hiveConf);
+    } else {
+      metastore.start();

Review Comment:
   We still would like to apply the `hiveConfOverride` here.
   I would guess that it would be easier to read if we calculate the `hiveConf` 
first, and then start the metastore with the final conf



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