tanishq-chugh commented on code in PR #5160:
URL: https://github.com/apache/hive/pull/5160#discussion_r1551369167


##########
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/conf/TestMetastoreConf.java:
##########
@@ -510,4 +510,29 @@ public void testClassNames() {
     Assert.assertEquals(MetastoreConf.ACID_OPEN_TXNS_COUNTER_SERVICE_CLASS,
         AcidOpenTxnsCounterService.class.getName());
   }
+
+  /**
+   * Verify that getVar(Configuration conf, ConfVars var) method of 
MetaStoreConf.java runs as expected in case of unset environment variables
+   * or any other variables that don't have default Value type of String
+   */
+  @Test
+  public void testGetVarForUnsetSystemProperties(){
+    conf = MetastoreConf.newMetastoreConf();
+    System.clearProperty(ConfVars.USE_SSL.getVarname());

Review Comment:
   I was using `System.clearProperty()` to replicate the required use case 
considering it being used in many other unit tests also, but now have changed 
it to `conf.unset()` .



-- 
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: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to