use of hudson.model.queue.QueueTaskFuture in project sonar-scanner-jenkins by SonarSource.
the class WaitForQualityGateStepTest method waitForQualityGateOk_survive_restart.
@Test
public void waitForQualityGateOk_survive_restart() {
story.addStep(new Statement() {
@Override
public void evaluate() throws Throwable {
handler.status = "PENDING";
QueueTaskFuture<WorkflowRun> pipeline = submitPipeline(false);
WorkflowRun b = pipeline.waitForStart();
waitForStepToWait(b);
}
});
story.addStep(new Statement() {
@Override
public void evaluate() throws Throwable {
WorkflowJob p = story.j.jenkins.getItemByFullName(JOB_NAME, WorkflowJob.class);
WorkflowRun b = p.getLastBuild();
submitWebHook(FAKE_TASK_ID, "SUCCESS", "OK", b);
story.j.assertBuildStatusSuccess(story.j.waitForCompletion(b));
}
});
}
use of hudson.model.queue.QueueTaskFuture in project sonar-scanner-jenkins by SonarSource.
the class WaitForQualityGateStepTest method waitForQualityGateOk_recheck_ws_on_restart.
@Test
public void waitForQualityGateOk_recheck_ws_on_restart() {
story.addStep(new Statement() {
@Override
public void evaluate() throws Throwable {
handler.status = "PENDING";
QueueTaskFuture<WorkflowRun> pipeline = submitPipeline(false);
WorkflowRun b = pipeline.waitForStart();
waitForStepToWait(b);
handler.status = "SUCCESS";
handler.analysisId = FAKE_ANALYSIS_ID;
handler.qgStatus = "OK";
}
});
story.addStep(new Statement() {
@Override
public void evaluate() throws Throwable {
WorkflowJob p = story.j.jenkins.getItemByFullName(JOB_NAME, WorkflowJob.class);
WorkflowRun b = p.getLastBuild();
story.j.assertBuildStatusSuccess(story.j.waitForCompletion(b));
}
});
}
Aggregations