Skip to content

Commit

Permalink
[JENKINS-30395] Deleting workaround now that we can use jenkins-test-…
Browse files Browse the repository at this point in the history
…harness 2.0.

Originally-Committed-As: 109b8f82415fc41f24d5d6545e586f0bce7ba705
  • Loading branch information
jglick committed Jan 22, 2016
1 parent a5e8e7c commit b99329d
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@

public class CpsFlowExecutionTest {

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

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

public class CpsScmFlowDefinitionTest {

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

@Test public void basics() throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
*/
public class DSLTest {

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

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

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

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

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

// currently executing workflow and its build
public WorkflowJob p;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
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 @@ -20,7 +19,7 @@
public class CpsThreadDumpTest {

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

@Before
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
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 @@ -18,7 +17,7 @@
public class LoadStepTest {

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

@Test
public void basics() throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

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.job.WorkflowJob;
import org.jenkinsci.plugins.workflow.job.WorkflowRun;
Expand All @@ -20,7 +19,7 @@
* @author Kohsuke Kawaguchi
*/
public class RestartingLoadStepTest {
@Rule public RestartableJenkinsRule story = JenkinsRuleExt.workAroundJenkins30395Restartable();
@Rule public RestartableJenkinsRule story = new RestartableJenkinsRule();

@Inject
Jenkins jenkins;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

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 @@ -33,7 +32,7 @@

public class IsUnixStepTest {

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

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

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 @@ -41,7 +40,7 @@
public class PushdStepTest {

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

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

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 @@ -33,7 +32,7 @@

public class PwdStepTest {

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

@Test public void basics() throws Exception {
WorkflowJob p = r.jenkins.createProject(WorkflowJob.class, "p");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,7 @@ public abstract class AbstractCpsFlowTest {
public TemporaryFolder tmp = new TemporaryFolder();

@Rule
public JenkinsRule jenkins = new JenkinsRule() {
@Override public void before() throws Throwable {
if (Thread.interrupted()) {
System.err.println("was interrupted before start");
}
super.before();
}
};
public JenkinsRule jenkins = new JenkinsRule();

/**
* Currently executing flow.
Expand Down

0 comments on commit b99329d

Please sign in to comment.