Skip to content
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.

Commit

Permalink
Merge pull request #62 from jglick/ExecutorStepExecution-deser-JENKIN…
Browse files Browse the repository at this point in the history
…S-26513

[JENKINS-26513] Deserialization error in ExecutorStepExecution
  • Loading branch information
jglick committed Mar 2, 2015
2 parents e850c8c + f94559d commit 8fe11e0
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.md
Expand Up @@ -11,6 +11,7 @@ Only noting significant user-visible or major API changes, not internal code cle
* Fixing `java.io.NotSerializableException: org.jenkinsci.plugins.workflow.support.steps.StageStepExecution$CanceledCause` thrown from certain scripts using `stage`.
* JENKINS-27052: `stage` step did not prevent a third build from entering a stage after a second was unblocked by a first leaving it.
* JENKINS-26605: Missing link to _Full Log_ under _Running Steps_ when a single step produced >150Kb of output.
* JENKINS-26513: deserialization error when restarting Jenkins inside `node {}` while it is still waiting for a slave to come online.
* `catchError` was incorrectly setting build status to failed when it was merely aborted, canceled, etc.
* JENKINS-26123: added `wait` option to `build`.
* Check for failure to even trigger a build from `build`.
Expand Down
Expand Up @@ -81,6 +81,7 @@
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.junit.runners.model.Statement;
import org.jvnet.hudson.test.Issue;
import org.jvnet.hudson.test.JenkinsRule;
import org.jvnet.hudson.test.MockQueueItemAuthenticator;
import org.jvnet.hudson.test.RandomlyFails;
Expand Down Expand Up @@ -649,4 +650,30 @@ public static void finish(final boolean terminate) {
});
}

@RandomlyFails("TODO JENKINS-25890 sometimes triggers a deadlock after restart")
@Issue("JENKINS-26513")
@Test public void executorStepRestart() {
story.addStep(new Statement() {
@Override public void evaluate() throws Throwable {
p = jenkins().createProject(WorkflowJob.class, "demo");
p.setDefinition(new CpsFlowDefinition("node('special') {echo 'OK ran'}"));
startBuilding();
while (!JenkinsRule.getLog(b).contains("Still waiting to schedule task")) {
Thread.sleep(100);
}
}
});
story.addStep(new Statement() {
@Override public void evaluate() throws Throwable {
story.j.createSlave("special", null);
rebuildContext(story.j);
while (b.isBuilding()) {
Thread.sleep(100);
}
assertBuildCompletedSuccessfully();
story.j.assertLogContains("OK ran", b);
}
});
}

}
Expand Up @@ -56,7 +56,7 @@
*/
public class ExecutorStepExecution extends AbstractStepExecutionImpl {

@Inject private transient ExecutorStep step;
@Inject(optional=true) private transient ExecutorStep step;
@StepContextParameter private transient TaskListener listener;
// Here just for requiredContext; could perhaps be passed to the PlaceholderTask constructor:
@StepContextParameter private transient Run<?,?> run;
Expand Down

0 comments on commit 8fe11e0

Please sign in to comment.