Skip to content

Commit

Permalink
[FIXED JENKINS-30395] Occasional ClosedByInterruptException.
Browse files Browse the repository at this point in the history
  • Loading branch information
jglick committed Sep 10, 2015
1 parent a8bc2aa commit aaa71d4
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 @@ -195,6 +195,7 @@
import org.junit.runners.model.Statement;
import com.gargoylesoftware.htmlunit.html.DomNodeUtil;
import com.gargoylesoftware.htmlunit.html.HtmlFormUtil;
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 @@ -1690,7 +1691,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 aaa71d4

Please sign in to comment.