Suppressing flaky shouldBeAbleToBlockFlyweightTaskAtTheLastMinute.
@@ -119,6 +119,7 @@ import java.util.concurrent.atomic.AtomicInteger;
import static org.hamcrest.Matchers.nullValue;
import static org.junit.Assert.*;
+import org.junit.Ignore;
/**
* @author Kohsuke Kawaguchi
@@ -811,6 +812,8 @@ public class QueueTest {
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");
@@ -855,6 +858,7 @@ public class QueueTest {
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()) {
