@Test
  public void testConfInSession() throws Exception {
    HiveConf hiveConf = new HiveConf();
    final String DUMMY_CONF_KEY = "hive.test.minihs2.dummy.config";
    final String DUMMY_CONF_VAL = "dummy.val";
    hiveConf.set(DUMMY_CONF_KEY, DUMMY_CONF_VAL);

    // also check a config that has default in hiveconf
    final String ZK_TIMEOUT_KEY = ConfVars.HIVE_ZOOKEEPER_SESSION_TIMEOUT.varname;
    final String ZK_TIMEOUT = "2562";
    hiveConf.set(ZK_TIMEOUT_KEY, ZK_TIMEOUT);

    // check the config used very often!
    hiveConf.setBoolVar(ConfVars.HIVE_SUPPORT_CONCURRENCY, false);

    miniHS2 = new MiniHS2(hiveConf);
    miniHS2.start(new HashMap<String, String>());

    Connection hs2Conn = DriverManager.getConnection(miniHS2.getJdbcURL(),
        System.getProperty("user.name"), "bar");
    Statement stmt = hs2Conn.createStatement();

    checkConfVal(DUMMY_CONF_KEY, DUMMY_CONF_KEY + "=" + DUMMY_CONF_VAL, stmt);
    checkConfVal(ZK_TIMEOUT_KEY, ZK_TIMEOUT_KEY + "=" + ZK_TIMEOUT, stmt);
    checkConfVal(ConfVars.HIVE_SUPPORT_CONCURRENCY.varname,
        ConfVars.HIVE_SUPPORT_CONCURRENCY.varname + "=" + "false", stmt);

    stmt.close();
    hs2Conn.close();

  }
Test if the MiniHS2 configuration gets passed down to the session
configuration

@throws Exception
itests/hive-unit/src/test/java/org/apache/hive/jdbc/miniHS2/TestMiniHS2.java