提交 c6c8836f 编写于 作者: J Jesse Glick 提交者: Oliver Gondža

[FIXED JENKINS-30395] Occasional ClosedByInterruptException.

(cherry picked from commit aaa71d4f)
上级 c110ccca
......@@ -190,6 +190,7 @@ import org.junit.rules.TestRule;
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;
......@@ -1668,7 +1669,11 @@ public class JenkinsRule implements TestRule, MethodRule, RootAction {
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);
}
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册