diff --git a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/ReplicationTestUtils.java b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/ReplicationTestUtils.java index 4caa884b11..43ac92a205 100644 --- a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/ReplicationTestUtils.java +++ b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/ReplicationTestUtils.java @@ -409,7 +409,8 @@ public static void insertRecordsIntoDB(WarehouseInstance primary, String DbName, nextVal = true; } - primary.run("CREATE TABLE " + tableNameOp + "_temp (key int, value int) " + tableStorage + "") + primary.run("CREATE TABLE " + tableNameOp + "_temp (key int, value int) " + tableStorage + + " tblproperties (" + tableProperty + ")") .run("INSERT INTO TABLE " + tableNameOp + "_temp VALUES " + buf.toString()) .run("SELECT key FROM " + tableNameOp + "_temp") .verifyResults(resultArray) @@ -462,7 +463,8 @@ public static void insertForMerge(WarehouseInstance primary, String primaryDbNam " ( "+ tableProperty + " )") .run("SHOW TABLES LIKE '" + tableName + "'") .verifyResult(tableName) - .run("CREATE TABLE " + tableNameMerge + " ( ID int, TranValue string, tran_date string) STORED AS ORC ") + .run("CREATE TABLE " + tableNameMerge + " ( ID int, TranValue string, tran_date string) STORED AS ORC " + + " TBLPROPERTIES ( "+ tableProperty + " )") .run("SHOW TABLES LIKE '" + tableNameMerge + "'") .verifyResult(tableNameMerge) .run("INSERT INTO " + tableName + " PARTITION (tran_date) VALUES (1, 'value_01', 'creation', '20170410')," + diff --git a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/WarehouseInstance.java b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/WarehouseInstance.java index 01f8cda2ff..7d4cb37054 100644 --- a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/WarehouseInstance.java +++ b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/WarehouseInstance.java @@ -148,6 +148,7 @@ private void initialize(String cmRoot, String externalTableWarehouseRoot, String } hiveConf.set(HiveConf.ConfVars.METASTORE_RAW_STORE_IMPL.varname, "org.apache.hadoop.hive.metastore.InjectableBehaviourObjectStore"); + hiveConf.set(HiveConf.ConfVars.HIVE_STRICT_MANAGED_TABLES.varname, "true"); System.setProperty(HiveConf.ConfVars.PREEXECHOOKS.varname, " "); System.setProperty(HiveConf.ConfVars.POSTEXECHOOKS.varname, " ");