Skip to content

Commit

Permalink
Merge pull request #3070 from jglick/QueueTest.shouldBeAbleToBlockFly…
Browse files Browse the repository at this point in the history
…weightTaskAtTheLastMinute

[JENKINS-30084] Suppressing flaky QueueTest.shouldBeAbleToBlockFlyweightTaskAtTheLastMinute
  • Loading branch information
jglick committed Oct 11, 2017
2 parents d50dc36 + eb5b40e commit 860d9c5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/src/test/java/hudson/model/QueueTest.java
Expand Up @@ -120,6 +120,7 @@

import static org.hamcrest.Matchers.nullValue;
import static org.junit.Assert.*;
import org.junit.Ignore;

/**
* @author Kohsuke Kawaguchi
Expand Down Expand Up @@ -812,6 +813,8 @@ public void shouldRunFlyweightTaskOnProvisionedNodeWhenNodeRestricted() throws E
assertEquals("aws-linux-dummy", matrixProject.getBuilds().getLastBuild().getBuiltOn().getLabelString());
}

@Ignore("TODO too flaky; upstream can finish before we even examine the queue")
@Issue("JENKINS-30084")
@Test
public void shouldBeAbleToBlockFlyweightTaskAtTheLastMinute() throws Exception {
MatrixProject matrixProject = r.jenkins.createProject(MatrixProject.class, "downstream");
Expand Down Expand Up @@ -856,6 +859,7 @@ public void shouldBeAbleToBlockFlyweightTaskAtTheLastMinute() throws Exception {
throw new Exception("the upstream task could not be scheduled, thus the test will be interrupted");
}
//let s wait for the Upstream to enter the buildable Queue
Thread.sleep(1000);
boolean enteredTheQueue = false;
while (!enteredTheQueue) {
for (Queue.BuildableItem item : Queue.getInstance().getBuildableItems()) {
Expand Down

0 comments on commit 860d9c5

Please sign in to comment.