Skip to content
Permalink
Browse files

[JENKINS-20662] Simplify test after feedback

  • Loading branch information
daniel-beck committed Apr 23, 2014
1 parent 26735ec commit b59c490a3b49d72e20007c1ca26051b6602f2401
Showing with 2 additions and 9 deletions.
  1. +2 −9 test/src/test/groovy/jenkins/model/lazy/LazyBuildMixIn_Test.groovy
@@ -6,6 +6,7 @@ import hudson.model.listeners.RunListener
import org.junit.Rule
import org.junit.Test
import org.jvnet.hudson.test.Bug
import org.jvnet.hudson.test.SleepBuilder
import org.jvnet.hudson.test.JenkinsRule

class LazyBuildMixIn_Test {
@@ -15,16 +16,8 @@ class LazyBuildMixIn_Test {
@Test
@Bug(20662)
public void testNewRunningBuildRelationFromPrevious() {
RunListener<Run> listener = new RunListener<Run>() {
@Override public void onCompleted(Run r, TaskListener listener) {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
}
}
};
RunListener.all().add(listener);
def p = r.createFreeStyleProject();
p.buildersList.replaceBy([new SleepBuilder(1000)])
def b1 = p.scheduleBuild2(0).get();
assert null == b1.getNextBuild();
def b2 = p.scheduleBuild2(0).waitForStart();

0 comments on commit b59c490

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