From 730d5f19b1eaedead8458487d92151a86845ea0e Mon Sep 17 00:00:00 2001 From: Jonathan Gamba Date: Wed, 20 Nov 2024 16:11:46 -0600 Subject: [PATCH] #30367 Fixing unit tests --- .../business/queue/PostgresJobQueueIntegrationTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dotcms-integration/src/test/java/com/dotcms/jobs/business/queue/PostgresJobQueueIntegrationTest.java b/dotcms-integration/src/test/java/com/dotcms/jobs/business/queue/PostgresJobQueueIntegrationTest.java index 18fcaedc00f2..f8fed037402e 100644 --- a/dotcms-integration/src/test/java/com/dotcms/jobs/business/queue/PostgresJobQueueIntegrationTest.java +++ b/dotcms-integration/src/test/java/com/dotcms/jobs/business/queue/PostgresJobQueueIntegrationTest.java @@ -385,10 +385,10 @@ void test_detectAndMarkAbandoned() throws Exception { assertEquals(createdJobIds, processedJobIds, "Processed jobs don't match created jobs"); // Verify no more jobs are detected - assertNull(jobQueue.detectAndMarkAbandoned( + assertTrue(jobQueue.detectAndMarkAbandoned( Duration.ofMinutes(1), - JobState.RUNNING, JobState.CANCEL_REQUESTED, JobState.CANCELLING - ), "There should be no more jobs abandoned"); + JobState.RUNNING, JobState.CANCEL_REQUESTED, JobState.CANCELLING).isEmpty(), + "There should be no more jobs abandoned"); // Verify all jobs are in ABANDONED state for (String jobId : createdJobIds) {