@BeforeClass
  public static void startServices() throws Exception {
    HiveConf hiveConf = new HiveConf();
    hiveConf.setIntVar(ConfVars.HIVE_SERVER2_THRIFT_MIN_WORKER_THREADS, 2);
    hiveConf.setIntVar(ConfVars.HIVE_SERVER2_THRIFT_MAX_WORKER_THREADS, 2);
    hiveConf.setBoolVar(ConfVars.HIVE_SUPPORT_CONCURRENCY, false);

    miniHS2 = new MiniHS2.Builder().withMiniMR().withRemoteMetastore().withConf(hiveConf).build();

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

    Connection hs2Conn = DriverManager.getConnection(miniHS2.getJdbcURL(), "hive", "hive");
    Statement stmt = hs2Conn.createStatement();

    // create table
    stmt.execute("drop table if exists t1");
    stmt.execute("create table t1 (c1 int)");

    stmt.close();
    hs2Conn.close();
  }
Test that set/unset of metaconf:hive.metastore.disallow.incompatible.col.type.changes is local
to the session

Two connections are created.  In one connection
metaconf:hive.metastore.disallow.incompatible.col.type.changes is set to false.  Then the
columm type can changed from int to smallint.  In the other connection
metaconf:hive.metastore.disallow.incompatible.col.type.changes is left with the default value
true.  In that connection changing column type from int to smallint will throw an error.
itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStoreAlterColumnPar.java