You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by br...@apache.org on 2014/11/26 03:10:01 UTC
svn commit: r1641745 -
/hive/trunk/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/Phase.java
Author: brock
Date: Wed Nov 26 02:10:00 2014
New Revision: 1641745
URL: http://svn.apache.org/r1641745
Log:
HIVE-8965 - Enhance PTest to kill all processes between tests and to report when a TEST*.xml file is not generated (Brock reviewed by Szehon)
Modified:
hive/trunk/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/Phase.java
Modified: hive/trunk/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/Phase.java
URL: http://svn.apache.org/viewvc/hive/trunk/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/Phase.java?rev=1641745&r1=1641744&r2=1641745&view=diff
==============================================================================
--- hive/trunk/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/Phase.java (original)
+++ hive/trunk/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/Phase.java Wed Nov 26 02:10:00 2014
@@ -94,7 +94,7 @@ public abstract class Phase {
for(HostExecutor hostExecutor : hostExecutors) {
futures.add(hostExecutor.execIgnoreAllErrors(command));
}
- return toListOfResults(futures);
+ return toListOfResults(futures, false);
}
// clean prep
protected List<RemoteCommandResult> execInstances(String command)
@@ -167,10 +167,15 @@ public abstract class Phase {
}
private <T extends RemoteCommandResult> List<T> toListOfResults(List<ListenableFuture<T>> futures)
throws Exception {
+ return toListOfResults(futures, true);
+ }
+ private <T extends RemoteCommandResult> List<T> toListOfResults(List<ListenableFuture<T>> futures,
+ boolean reportErrors)
+ throws Exception {
List<T> results = Lists.newArrayList();
for(T result : Futures.allAsList(futures).get()) {
if(result != null) {
- if(result.getException() != null || result.getExitCode() != 0) {
+ if(reportErrors && (result.getException() != null || result.getExitCode() != 0)) {
throw new SSHExecutionException(result);
}
results.add(result);