diff --git a/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/Phase.java b/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/Phase.java index aee09b348595..47633ec44818 100644 --- a/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/Phase.java +++ b/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/Phase.java @@ -94,7 +94,7 @@ protected List execHostsIgnoreErrors(String command) for(HostExecutor hostExecutor : hostExecutors) { futures.add(hostExecutor.execIgnoreAllErrors(command)); } - return toListOfResults(futures); + return toListOfResults(futures, false); } // clean prep protected List execInstances(String command) @@ -167,10 +167,15 @@ private List flatten(List List toListOfResults(List> futures) throws Exception { + return toListOfResults(futures, true); + } + private List toListOfResults(List> futures, + boolean reportErrors) + throws Exception { List 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);