Skip to content

Commit

Permalink
Fix JENKINS-18443 when running on slaves
Browse files Browse the repository at this point in the history
  • Loading branch information
lanfeust69 committed Apr 23, 2014
1 parent be6f3ec commit bfbd152
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/main/java/org/jenkinsci/plugins/xunit/XUnitProcessor.java
Expand Up @@ -114,6 +114,15 @@ private boolean performTests(XUnitLog xUnitLog, AbstractBuild<?, ?> build, Build
result = getWorkspace(build).act(xUnitTransformer);
findTest = true;
} catch (InterruptedException ie) {
// handled tunneled exceptions
Throwable originalException = null;
Throwable cause = ie.getCause();
while (cause != null) {
originalException = cause;
cause = cause.getCause();
}
if (originalException instanceof InterruptedException)
ie = (InterruptedException)originalException;

if (ie instanceof NoFoundTestException) {
xUnitLog.infoConsoleLogger("Failing BUILD.");
Expand All @@ -129,6 +138,9 @@ private boolean performTests(XUnitLog xUnitLog, AbstractBuild<?, ?> build, Build
xUnitLog.infoConsoleLogger("Failing BUILD.");
throw new StopTestProcessingException();
}

xUnitLog.warningConsoleLogger("Caught exception of unexpected type " + ie.getClass() + ", rethrowing");
throw ie;
}

if (!result && xUnitToolInfo.isStopProcessingIfError()) {
Expand Down

0 comments on commit bfbd152

Please sign in to comment.