Skip to content
Permalink
Browse files

[JENKINS-25938] Starting to use AsynchronousExecutable.

Originally-Committed-As: ee2ca390e73004b411e133c1832b88e977b47f28
  • Loading branch information
jglick committed Mar 20, 2015
1 parent 63d23b4 commit 89032eb815863a7008a21ad6d545e33eb77160cc
Showing with 11 additions and 2 deletions.
  1. +11 −2 aggregator/src/test/java/org/jenkinsci/plugins/workflow/WorkflowTest.java
@@ -26,6 +26,7 @@

import com.google.common.base.Function;
import hudson.model.Computer;
import hudson.model.Executor;
import hudson.model.Node;
import hudson.model.ParametersAction;
import hudson.model.ParametersDefinitionProperty;
@@ -107,7 +108,7 @@ public void evaluate() throws Throwable {
startBuilding();
waitForWorkflowToSuspend();
assertTrue(b.isBuilding());
assertFalse(jenkins().toComputer().isIdle());
liveness();
}
});
story.addStep(new Statement() {
@@ -118,14 +119,22 @@ public void evaluate() throws Throwable {
for (int i = 0; i < 600 && !Queue.getInstance().isEmpty(); i++) {
Thread.sleep(100);
}
assertFalse(jenkins().toComputer().isIdle());
liveness();
FileUtils.write(new File(jenkins().getRootDir(), "touch"), "I'm here");
watchDescriptor.watchUpdate();
waitForWorkflowToComplete();
assertBuildCompletedSuccessfully();
}
});
}
private void liveness() {
assertFalse(jenkins().toComputer().isIdle());
Executor e = b.getOneOffExecutor();
assertNotNull(e);
assertEquals(e, b.getExecutor());
assertTrue(e.isActive());
assertFalse(e.isAlive());
}

/**
* Workflow captures a stateful object, and we verify that it survives the restart

0 comments on commit 89032eb

Please sign in to comment.
You can’t perform that action at this time.