Skip to content

Commit

Permalink
[FIXED JENKINS-29571] Make CpsFlowExecution.owner transient (JENKINS-…
Browse files Browse the repository at this point in the history
…27704) to avoid problems after renames/moves.

Originally-Committed-As: b7014e66b8b064794efea6c78f35160c5250cc2e
  • Loading branch information
jglick committed Jul 22, 2015
1 parent 305082c commit 5170bb1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Expand Up @@ -56,7 +56,6 @@
import org.jenkinsci.plugins.workflow.test.steps.SemaphoreStep;
import static org.junit.Assert.*;
import org.junit.ClassRule;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.jvnet.hudson.test.BuildWatcher;
Expand Down Expand Up @@ -231,7 +230,6 @@ public void failedToStartRun() throws Exception {
r.assertBuildStatusSuccess(r.waitForCompletion(b));
}

@Ignore("TODO as per JENKINS-27704, CpsFlowExecution.owner should be transient")
@Issue("JENKINS-29571")
@Test public void buildRecordAfterRename() throws Exception {
{
Expand Down
Expand Up @@ -419,7 +419,14 @@ private String key() {
System.err.printf("loading %s @%h%n", this, this);
}
if (execution != null) {
execution.onLoad();
try {
execution.onLoad(new Owner(this));
} catch (IOException x) {
LOGGER.log(Level.WARNING, null, x);
execution = null; // probably too broken to use
}
}
if (execution != null) {
execution.addListener(new GraphL());
executionPromise.set(execution);
if (!execution.isComplete()) {
Expand Down

0 comments on commit 5170bb1

Please sign in to comment.