From e697b96f051c445759413a6c5d3db8e35f45e6bc Mon Sep 17 00:00:00 2001 From: MM1277 Date: Thu, 4 Apr 2024 11:44:03 +0200 Subject: [PATCH] Closes #2542 - Flag that counts the comments of a task has been added --- .../jobs/WorkbasketCleanupJobAccTest.java | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/lib/taskana-core/src/test/java/acceptance/jobs/WorkbasketCleanupJobAccTest.java b/lib/taskana-core/src/test/java/acceptance/jobs/WorkbasketCleanupJobAccTest.java index a32fef9480..3ca1860f57 100644 --- a/lib/taskana-core/src/test/java/acceptance/jobs/WorkbasketCleanupJobAccTest.java +++ b/lib/taskana-core/src/test/java/acceptance/jobs/WorkbasketCleanupJobAccTest.java @@ -6,7 +6,6 @@ import java.time.Instant; import java.util.ArrayList; import java.util.List; -import java.util.stream.Collectors; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -93,7 +92,7 @@ void shouldNotCleanWorkbasketMarkedForDeletionIfWorkbasketHasTasks() throws Exce @Test void should_DeleteOldWorkbasketCleanupJobs_When_InitializingSchedule() throws Exception { - List workbasketCleanupJobsToCreate = new ArrayList<>(); + List workbasketCleanupJobs = new ArrayList<>(); List taskRefreshJobsToCreate = new ArrayList<>(); List classificationChangedJobsToCreate = new ArrayList<>(); @@ -101,7 +100,7 @@ void should_DeleteOldWorkbasketCleanupJobs_When_InitializingSchedule() throws Ex ScheduledJob job = new ScheduledJob(); job.setType(WorkbasketCleanupJob.class.getName()); - workbasketCleanupJobsToCreate.add(job); + workbasketCleanupJobs.add(job); ScheduledJob job1 = new ScheduledJob(); job1.setType(TaskRefreshJob.class.getName()); taskRefreshJobsToCreate.add(job1); @@ -113,7 +112,7 @@ void should_DeleteOldWorkbasketCleanupJobs_When_InitializingSchedule() throws Ex for (int i = 0; i < 10; i++) { - ScheduledJob job = workbasketCleanupJobsToCreate.get(i); + ScheduledJob job = workbasketCleanupJobs.get(i); taskanaEngine.getJobService().createJob(job); job = taskRefreshJobsToCreate.get(i); taskanaEngine.getJobService().createJob(job); @@ -126,12 +125,6 @@ void should_DeleteOldWorkbasketCleanupJobs_When_InitializingSchedule() throws Ex assertThat(jobsToRun).hasSize(30); - List workbasketCleanupJobs = - jobsToRun.stream() - .filter( - scheduledJob -> scheduledJob.getType().equals(WorkbasketCleanupJob.class.getName())) - .collect(Collectors.toList()); - AbstractTaskanaJob.initializeSchedule(taskanaEngine, WorkbasketCleanupJob.class); jobsToRun = getJobMapper(taskanaEngine).findJobsToRun(Instant.now());