diff options
author | Pierre <pierre.guillot@sonarsource.com> | 2020-06-11 14:53:08 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2020-06-26 20:04:57 +0000 |
commit | e85644a5ea11ff8cbd3f5593d917c68d5d3ee7d0 (patch) | |
tree | 5b9a1f0a08e7669bada357336fb6801d64d633c4 /server/sonar-ce-common | |
parent | 0a9b880143936ba89f9830d454f1dc3ef8d772b3 (diff) | |
download | sonarqube-e85644a5ea11ff8cbd3f5593d917c68d5d3ee7d0.tar.gz sonarqube-e85644a5ea11ff8cbd3f5593d917c68d5d3ee7d0.zip |
SONAR-13400 exclude portfolio (but not applications) from worker peek during indexation
Diffstat (limited to 'server/sonar-ce-common')
-rw-r--r-- | server/sonar-ce-common/src/test/java/org/sonar/ce/queue/CeQueueImplTest.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/server/sonar-ce-common/src/test/java/org/sonar/ce/queue/CeQueueImplTest.java b/server/sonar-ce-common/src/test/java/org/sonar/ce/queue/CeQueueImplTest.java index 1c155e145e6..1bc242c5702 100644 --- a/server/sonar-ce-common/src/test/java/org/sonar/ce/queue/CeQueueImplTest.java +++ b/server/sonar-ce-common/src/test/java/org/sonar/ce/queue/CeQueueImplTest.java @@ -396,7 +396,7 @@ public class CeQueueImplTest { @Test public void fail_to_cancel_if_in_progress() { submit(CeTaskTypes.REPORT, newComponent(randomAlphabetic(11))); - CeQueueDto ceQueueDto = db.getDbClient().ceQueueDao().peek(session, WORKER_UUID, false).get(); + CeQueueDto ceQueueDto = db.getDbClient().ceQueueDao().peek(session, WORKER_UUID, false, false).get(); expectedException.expect(IllegalStateException.class); expectedException.expectMessage(startsWith("Task is in progress and can't be canceled")); @@ -410,7 +410,7 @@ public class CeQueueImplTest { CeTask pendingTask1 = submit(CeTaskTypes.REPORT, newComponent(randomAlphabetic(12))); CeTask pendingTask2 = submit(CeTaskTypes.REPORT, newComponent(randomAlphabetic(12))); - db.getDbClient().ceQueueDao().peek(session, WORKER_UUID, false); + db.getDbClient().ceQueueDao().peek(session, WORKER_UUID, false, false); int canceledCount = underTest.cancelAll(); assertThat(canceledCount).isEqualTo(2); @@ -437,7 +437,7 @@ public class CeQueueImplTest { @Test public void pauseWorkers_marks_workers_as_pausing_if_some_tasks_in_progress() { submit(CeTaskTypes.REPORT, newComponent(randomAlphabetic(12))); - db.getDbClient().ceQueueDao().peek(session, WORKER_UUID, false); + db.getDbClient().ceQueueDao().peek(session, WORKER_UUID, false, false); // task is in-progress assertThat(underTest.getWorkersPauseStatus()).isEqualTo(CeQueue.WorkersPauseStatus.RESUMED); @@ -458,7 +458,7 @@ public class CeQueueImplTest { @Test public void resumeWorkers_resumes_pausing_workers() { submit(CeTaskTypes.REPORT, newComponent(randomAlphabetic(12))); - db.getDbClient().ceQueueDao().peek(session, WORKER_UUID, false); + db.getDbClient().ceQueueDao().peek(session, WORKER_UUID, false, false); // task is in-progress underTest.pauseWorkers(); @@ -480,7 +480,7 @@ public class CeQueueImplTest { @Test public void fail_in_progress_task() { CeTask task = submit(CeTaskTypes.REPORT, newComponent(randomAlphabetic(12))); - CeQueueDto queueDto = db.getDbClient().ceQueueDao().peek(db.getSession(), WORKER_UUID, false).get(); + CeQueueDto queueDto = db.getDbClient().ceQueueDao().peek(db.getSession(), WORKER_UUID, false, false).get(); underTest.fail(db.getSession(), queueDto, "TIMEOUT", "Failed on timeout"); |