Skip to content

Commit

Permalink
Merge pull request #1826 from jglick/ClosedByInterruptException
Browse files Browse the repository at this point in the history
[JENKINS-30395] Occasional ClosedByInterruptException
Originally-Committed-As: 43f4b2b570b90d20b8ba64d2c534d1c4f554c04c
  • Loading branch information
jglick committed Sep 17, 2015
2 parents 63131f6 + ef84771 commit 7ca8fd1
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 7ca8fd1

Please sign in to comment.