Skip to content

Commit

Permalink
Merge pull request #277 from jglick/diag-JENKINS-30395
Browse files Browse the repository at this point in the history
[JENKINS-30395] Preventing a recurrent ClosedByInterruptException in CI
Originally-Committed-As: 3d85711de54cd43f1b703e5a9dc0345d23730ced
  • Loading branch information
jglick committed Dec 18, 2015
2 parents 3379213 + 4875a77 commit 90d38ad
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 13 deletions.
Expand Up @@ -50,7 +50,7 @@

public class CpsFlowExecutionTest {

@Rule public RestartableJenkinsRule story = new RestartableJenkinsRule();
@Rule public RestartableJenkinsRule story = JenkinsRuleExt.workAroundJenkins30395Restartable();

private static WeakReference<ClassLoader> LOADER;
public static void register(Object o) {
Expand Down
Expand Up @@ -60,7 +60,7 @@

public class CpsScmFlowDefinitionTest {

@Rule public JenkinsRule r = new JenkinsRule();
@Rule public JenkinsRule r = JenkinsRuleExt.workAroundJenkins30395();
@Rule public GitSampleRepoRule sampleRepo = new GitSampleRepoRule();

@Test public void basics() throws Exception {
Expand Down
Expand Up @@ -37,7 +37,7 @@
*/
public class DSLTest {

@Rule public JenkinsRule r = new JenkinsRule();
@Rule public JenkinsRule r = JenkinsRuleExt.workAroundJenkins30395();

@Test public void overrideFunction() throws Exception {
WorkflowJob p = r.jenkins.createProject(WorkflowJob.class, "p");
Expand Down
Expand Up @@ -49,7 +49,7 @@
public class DynamicEnvironmentExpanderTest {

@ClassRule public static BuildWatcher buildWatcher = new BuildWatcher();
@Rule public RestartableJenkinsRule story = new RestartableJenkinsRule();
@Rule public RestartableJenkinsRule story = JenkinsRuleExt.workAroundJenkins30395Restartable();

@Issue("JENKINS-26163")
@Test public void dynamics() {
Expand Down
Expand Up @@ -46,7 +46,7 @@
public abstract class SingleJobTestBase extends Assert {

@ClassRule public static BuildWatcher buildWatcher = new BuildWatcher();
@Rule public RestartableJenkinsRule story = new RestartableJenkinsRule();
@Rule public RestartableJenkinsRule story = JenkinsRuleExt.workAroundJenkins30395Restartable();

// currently executing workflow and its build
public WorkflowJob p;
Expand Down
Expand Up @@ -4,6 +4,7 @@
import static java.util.Arrays.asList;
import java.util.List;
import org.apache.commons.lang.StringUtils;
import org.jenkinsci.plugins.workflow.JenkinsRuleExt;
import org.jenkinsci.plugins.workflow.cps.CpsThreadDump.ThreadInfo;
import org.jenkinsci.plugins.workflow.job.WorkflowJob;
import org.jenkinsci.plugins.workflow.job.WorkflowRun;
Expand All @@ -19,8 +20,7 @@
public class CpsThreadDumpTest {

@ClassRule public static BuildWatcher buildWatcher = new BuildWatcher();
@Rule
public JenkinsRule j = new JenkinsRule();
@Rule public JenkinsRule j = JenkinsRuleExt.workAroundJenkins30395();
private WorkflowJob p;

@Before
Expand Down
@@ -1,5 +1,6 @@
package org.jenkinsci.plugins.workflow.cps.steps;

import org.jenkinsci.plugins.workflow.JenkinsRuleExt;
import org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition;
import org.jenkinsci.plugins.workflow.job.WorkflowJob;
import org.jenkinsci.plugins.workflow.job.WorkflowRun;
Expand All @@ -17,7 +18,7 @@
public class LoadStepTest {

@ClassRule public static BuildWatcher buildWatcher = new BuildWatcher();
@Rule public JenkinsRule r = new JenkinsRule();
@Rule public JenkinsRule r = JenkinsRuleExt.workAroundJenkins30395();

@Test
public void basics() throws Exception {
Expand Down
Expand Up @@ -2,6 +2,7 @@

import javax.inject.Inject;
import jenkins.model.Jenkins;
import org.jenkinsci.plugins.workflow.JenkinsRuleExt;
import org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition;
import org.jenkinsci.plugins.workflow.cps.CpsFlowExecution;
import org.jenkinsci.plugins.workflow.job.WorkflowJob;
Expand All @@ -20,8 +21,7 @@
* @author Kohsuke Kawaguchi
*/
public class RestartingLoadStepTest {
@Rule
public RestartableJenkinsRule story = new RestartableJenkinsRule();
@Rule public RestartableJenkinsRule story = JenkinsRuleExt.workAroundJenkins30395Restartable();

@Inject
Jenkins jenkins;
Expand Down
Expand Up @@ -24,6 +24,7 @@

package org.jenkinsci.plugins.workflow.steps;

import org.jenkinsci.plugins.workflow.JenkinsRuleExt;
import org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition;
import org.jenkinsci.plugins.workflow.job.WorkflowJob;
import org.junit.Test;
Expand All @@ -32,7 +33,7 @@

public class IsUnixStepTest {

@Rule public JenkinsRule r = new JenkinsRule();
@Rule public JenkinsRule r = JenkinsRuleExt.workAroundJenkins30395();

@Test public void basics() throws Exception {
WorkflowJob p = r.jenkins.createProject(WorkflowJob.class, "p");
Expand Down
Expand Up @@ -26,6 +26,7 @@

import hudson.Functions;
import java.io.File;
import org.jenkinsci.plugins.workflow.JenkinsRuleExt;
import org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition;
import org.jenkinsci.plugins.workflow.job.WorkflowJob;
import org.jenkinsci.plugins.workflow.job.WorkflowRun;
Expand All @@ -40,7 +41,7 @@
public class PushdStepTest {

@ClassRule public static BuildWatcher buildWatcher = new BuildWatcher();
@Rule public RestartableJenkinsRule story = new RestartableJenkinsRule();
@Rule public RestartableJenkinsRule story = JenkinsRuleExt.workAroundJenkins30395Restartable();

private String pwdStep() {
return Functions.isWindows() ? "bat 'cd'" : "sh 'pwd'";
Expand Down
Expand Up @@ -24,6 +24,7 @@

package org.jenkinsci.plugins.workflow.steps;

import org.jenkinsci.plugins.workflow.JenkinsRuleExt;
import org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition;
import org.jenkinsci.plugins.workflow.job.WorkflowJob;
import org.junit.Test;
Expand All @@ -32,7 +33,7 @@

public class PwdStepTest {

@Rule public JenkinsRule r = new JenkinsRule();
@Rule public JenkinsRule r = JenkinsRuleExt.workAroundJenkins30395();

@Test public void basics() throws Exception {
WorkflowJob p = r.jenkins.createProject(WorkflowJob.class, "p");
Expand Down

0 comments on commit 90d38ad

Please sign in to comment.