Skip to content

Commit

Permalink
[FIXED JENKINS-30395] Occasional ClosedByInterruptException.
Browse files Browse the repository at this point in the history
(cherry picked from commit aaa71d4feb1f4ce1c477ac03c9fc6df543cca84b)

Originally-Committed-As: c6c8836fd2711a46b31fbce08f37271f3f5f3a2f
  • Loading branch information
jglick authored and olivergondza committed Sep 29, 2015
1 parent 88d8f2f commit 8dcb06f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java
Expand Up @@ -190,6 +190,7 @@
import org.junit.runner.Description;
import org.junit.runners.model.FrameworkMethod;
import org.junit.runners.model.Statement;
import java.nio.channels.ClosedByInterruptException;
import org.jvnet.hudson.test.recipes.Recipe;
import org.jvnet.hudson.test.rhino.JavaScriptDebugger;
import org.kohsuke.stapler.ClassDescriptor;
Expand Down Expand Up @@ -1668,7 +1669,11 @@ void resolveDependencies() throws Exception {

File dst = new File(home, "plugins/" + artifactId + ".jpi");
if(!dst.exists() || dst.lastModified()!=dependencyJar.lastModified()) {
FileUtils.copyFile(dependencyJar, dst);
try {
FileUtils.copyFile(dependencyJar, dst);
} catch (ClosedByInterruptException x) {
throw new AssumptionViolatedException("copying dependencies was interrupted", x);
}
}
}
}
Expand Down

0 comments on commit 8dcb06f

Please sign in to comment.