Skip to content

Commit

Permalink
Merge pull request #99 from slonopotamus/parent-pom-3.54
Browse files Browse the repository at this point in the history
Bump parent pom to 3.54
  • Loading branch information
dwnusbaum committed Dec 17, 2019
2 parents 261e310 + 74b1c35 commit e3c3be3
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 10 deletions.
12 changes: 6 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>3.42</version>
<version>3.54</version>
<relativePath />
</parent>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
Expand Down Expand Up @@ -64,14 +64,14 @@
<properties>
<revision>3.4</revision>
<changelist>-SNAPSHOT</changelist>
<jenkins.version>2.121.1</jenkins.version>
<jenkins.version>2.138.4</jenkins.version>
<java.level>8</java.level>
<no-test-jar>false</no-test-jar>
<useBeta>true</useBeta>
<hpi.compatibleSinceVersion>3.0</hpi.compatibleSinceVersion>
<git-plugin.version>3.7.0</git-plugin.version>
<workflow-scm-step-plugin.version>2.7</workflow-scm-step-plugin.version>
<workflow-step-api-plugin.version>2.19</workflow-step-api-plugin.version>
<workflow-step-api-plugin.version>2.20</workflow-step-api-plugin.version>
<scm-api-plugin.version>2.2.6</scm-api-plugin.version>
</properties>
<dependencies>
Expand All @@ -83,7 +83,7 @@
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-api</artifactId>
<version>2.30</version>
<version>2.36</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
Expand Down Expand Up @@ -123,7 +123,7 @@
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>structs</artifactId>
<version>1.17</version>
<version>1.18</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -154,7 +154,7 @@
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-job</artifactId>
<version>2.21</version>
<version>2.36</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,13 +311,10 @@ public void evaluate() throws Throwable {

// Like org.hamcrest.text.MatchesPattern.matchesPattern(String) but doing a substring, not whole-string, match:
private static Matcher<String> containsRegexp(final String rx) {
return new SubstringMatcher(rx) {
return new SubstringMatcher("containing the regexp", false, rx) {
@Override protected boolean evalSubstringOf(String string) {
return Pattern.compile(rx).matcher(string).find();
}
@Override protected String relationship() {
return "containing the regexp";
}
};
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package org.jenkinsci.plugins.workflow.test.steps;

import hudson.model.Result;
import hudson.model.queue.QueueTaskFuture;
import org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition;
import org.jenkinsci.plugins.workflow.job.WorkflowJob;
import org.jenkinsci.plugins.workflow.job.WorkflowRun;
import org.junit.Rule;
import org.junit.Test;
import org.jvnet.hudson.test.JenkinsRule;

import static org.junit.Assert.assertNotNull;

public class SemaphoreStepTest {
@Rule
public JenkinsRule j = new JenkinsRule();

@Test
public void hardKill() throws Exception {
WorkflowJob p1 = j.jenkins.createProject(WorkflowJob.class, "p");
p1.setDefinition(new CpsFlowDefinition("echo 'locked!'; semaphore 'wait'"));
QueueTaskFuture<WorkflowRun> future = p1.scheduleBuild2(0);
assertNotNull(future);
WorkflowRun b = future.waitForStart();
SemaphoreStep.waitForStart("wait/1", b);

b.doKill();
j.waitForMessage("Hard kill!", b);
j.assertBuildStatus(Result.ABORTED, future);
}
}

0 comments on commit e3c3be3

Please sign in to comment.