Modified: 
hive/branches/vectorization/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/context/CloudExecutionContextProvider.java
URL: 
http://svn.apache.org/viewvc/hive/branches/vectorization/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/context/CloudExecutionContextProvider.java?rev=1527793&r1=1527792&r2=1527793&view=diff
==============================================================================
--- 
hive/branches/vectorization/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/context/CloudExecutionContextProvider.java
 (original)
+++ 
hive/branches/vectorization/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/context/CloudExecutionContextProvider.java
 Mon Sep 30 21:58:29 2013
@@ -106,7 +106,7 @@ public class CloudExecutionContextProvid
             return size() > 100;
           }
         });
-    mTerminationExecutor = Executors.newCachedThreadPool();
+    mTerminationExecutor = Executors.newSingleThreadExecutor();
     mHostLog = new RandomAccessFile(new File(dataDir, "hosts"), "rw");
     initialize();
   }

Modified: 
hive/branches/vectorization/testutils/ptest2/src/main/resources/batch-exec.vm
URL: 
http://svn.apache.org/viewvc/hive/branches/vectorization/testutils/ptest2/src/main/resources/batch-exec.vm?rev=1527793&r1=1527792&r2=1527793&view=diff
==============================================================================
--- 
hive/branches/vectorization/testutils/ptest2/src/main/resources/batch-exec.vm 
(original)
+++ 
hive/branches/vectorization/testutils/ptest2/src/main/resources/batch-exec.vm 
Mon Sep 30 21:58:29 2013
@@ -23,7 +23,11 @@ chmod -R u+w $logDir
 rm -rf $logDir
 # makes $logDir and $logDir/tmp
 mkdir -p $logDir/tmp
-if [[ -n "${javaHome}" ]]
+if [[ -n "${javaHomeForTests}" ]]
+then
+  export JAVA_HOME=$javaHomeForTests
+  export PATH=$JAVA_HOME/bin/:$PATH
+elif [[ -n "${javaHome}" ]]
 then
   export JAVA_HOME=$javaHome
   export PATH=$JAVA_HOME/bin/:$PATH

Modified: 
hive/branches/vectorization/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.java
URL: 
http://svn.apache.org/viewvc/hive/branches/vectorization/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.java?rev=1527793&r1=1527792&r2=1527793&view=diff
==============================================================================
--- 
hive/branches/vectorization/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.java
 (original)
+++ 
hive/branches/vectorization/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.java
 Mon Sep 30 21:58:29 2013
@@ -78,6 +78,30 @@ public class TestScripts  {
     Approvals.verify(actual);
   }
   @Test
+  public void testAlternativeTestJVM() throws Throwable {
+    Map<String, String> templateVariables = Maps.newHashMap();
+    templateVariables.put("repository", "git:///repo1");
+    templateVariables.put("repositoryName", "apache");
+    templateVariables.put("branch", "branch-1");
+    templateVariables.put("localDir", "/some/local/dir");
+    templateVariables.put("workingDir", "/some/working/dir");
+    templateVariables.put("antArgs", "-Dant=arg1");
+    templateVariables.put("buildTag", "build-1");
+    templateVariables.put("logDir", "/some/log/dir");
+    templateVariables.put("instanceName", "instance-1");
+    templateVariables.put("batchName","batch-1");
+    templateVariables.put("numOfFailedTests", "20");
+    templateVariables.put("maxSourceDirs", String.valueOf(5));
+    templateVariables.put("testArguments", "-Dtest=arg1");
+    templateVariables.put("clearLibraryCache", "true");
+    templateVariables.put("javaHome", "/usr/java/jdk1.7");
+    templateVariables.put("javaHomeForTests", "/usr/java/jdk1.7-other");
+    templateVariables.put("antEnvOpts", "-Dhttp.proxyHost=somehost 
-Dhttp.proxyPort=3128");
+    String template = readResource("batch-exec.vm");
+    String actual = getTemplateResult(template, templateVariables);
+    Approvals.verify(actual);
+  }
+  @Test
   public void testPrepNone() throws Throwable {
     Map<String, String> templateVariables = Maps.newHashMap();
     templateVariables.put("repository", "git:///repo1");

Modified: 
hive/branches/vectorization/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.testBatch.approved.txt
URL: 
http://svn.apache.org/viewvc/hive/branches/vectorization/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.testBatch.approved.txt?rev=1527793&r1=1527792&r2=1527793&view=diff
==============================================================================
--- 
hive/branches/vectorization/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.testBatch.approved.txt
 (original)
+++ 
hive/branches/vectorization/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.testBatch.approved.txt
 Mon Sep 30 21:58:29 2013
@@ -22,7 +22,11 @@ chmod -R u+w /some/log/dir
 rm -rf /some/log/dir
 # makes /some/log/dir and /some/log/dir/tmp
 mkdir -p /some/log/dir/tmp
-if [[ -n "/usr/java/jdk1.7" ]]
+if [[ -n "${javaHomeForTests}" ]]
+then
+  export JAVA_HOME=$javaHomeForTests
+  export PATH=$JAVA_HOME/bin/:$PATH
+elif [[ -n "/usr/java/jdk1.7" ]]
 then
   export JAVA_HOME=/usr/java/jdk1.7
   export PATH=$JAVA_HOME/bin/:$PATH


Reply via email to