Author: hashutosh
Date: Thu Mar 20 16:08:16 2014
New Revision: 1579676

URL: http://svn.apache.org/r1579676
Log:
HIVE-6488 : Investigate TestBeeLineWithArgs (Jason Dere via Ashutosh Chauhan)

Modified:
    
hive/trunk/itests/hive-unit/src/test/java/org/apache/hive/beeline/TestBeeLineWithArgs.java

Modified: 
hive/trunk/itests/hive-unit/src/test/java/org/apache/hive/beeline/TestBeeLineWithArgs.java
URL: 
http://svn.apache.org/viewvc/hive/trunk/itests/hive-unit/src/test/java/org/apache/hive/beeline/TestBeeLineWithArgs.java?rev=1579676&r1=1579675&r2=1579676&view=diff
==============================================================================
--- 
hive/trunk/itests/hive-unit/src/test/java/org/apache/hive/beeline/TestBeeLineWithArgs.java
 (original)
+++ 
hive/trunk/itests/hive-unit/src/test/java/org/apache/hive/beeline/TestBeeLineWithArgs.java
 Thu Mar 20 16:08:16 2014
@@ -70,6 +70,9 @@ public class TestBeeLineWithArgs {
   @BeforeClass
   public static void preTests() throws Exception {
     HiveConf hiveConf = new HiveConf();
+    // Set to non-zk lock manager to prevent HS2 from trying to connect
+    hiveConf.setVar(HiveConf.ConfVars.HIVE_LOCK_MANAGER, 
"org.apache.hadoop.hive.ql.lockmgr.EmbeddedLockManager");
+
     //  hiveConf.logVars(System.err);
     // System.err.flush();
 
@@ -427,7 +430,10 @@ public class TestBeeLineWithArgs {
          argList.add("--hivevar");
     argList.add("DUMMY_TBL=embedded_table");
     final String TEST_NAME = "testEmbeddedBeelineConnection";
-    final String SCRIPT_TEXT = "create table ${DUMMY_TBL} (d int);\nshow 
tables;\n";
+    // Set to non-zk lock manager to avoid trying to connect to zookeeper
+    final String SCRIPT_TEXT =
+        "set 
hive.lock.manager=org.apache.hadoop.hive.ql.lockmgr.EmbeddedLockManager;\n" +
+        "create table ${DUMMY_TBL} (d int);\nshow tables;\n";
     final String EXPECTED_PATTERN = "embedded_table";
     testScriptFile(TEST_NAME, SCRIPT_TEXT, EXPECTED_PATTERN, true, argList);
   }


Reply via email to