This is an automated email from the ASF dual-hosted git repository.
stefanegli pushed a commit to branch master
in repository
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-event.git
The following commit(s) were added to refs/heads/master by this push:
new b5a31bf SLING-12078 : adding 2sec delays as workaround to
TOPOLOGY_INIT/addJob race condition
b5a31bf is described below
commit b5a31bfe1d029837854bc16925cfbc7b4dd07dee
Author: stefan-egli <[email protected]>
AuthorDate: Mon Oct 9 17:13:32 2023 +0200
SLING-12078 : adding 2sec delays as workaround to TOPOLOGY_INIT/addJob race
condition
---
src/test/java/org/apache/sling/event/it/OrderedQueueIT.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/test/java/org/apache/sling/event/it/OrderedQueueIT.java
b/src/test/java/org/apache/sling/event/it/OrderedQueueIT.java
index 13222a6..e73958f 100644
--- a/src/test/java/org/apache/sling/event/it/OrderedQueueIT.java
+++ b/src/test/java/org/apache/sling/event/it/OrderedQueueIT.java
@@ -29,6 +29,7 @@ import org.apache.sling.event.jobs.NotificationConstants;
import org.apache.sling.event.jobs.Queue;
import org.apache.sling.event.jobs.QueueConfiguration;
import org.apache.sling.event.jobs.consumer.JobConsumer;
+import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.ops4j.pax.exam.Configuration;
@@ -65,6 +66,11 @@ public class OrderedQueueIT extends AbstractJobHandlingIT {
);
}
+ @Before
+ public void additionalStartupDelay() throws InterruptedException {
+ Thread.sleep(2000);
+ }
+
/**
* Ordered Queue Test
*/
@@ -160,4 +166,4 @@ public class OrderedQueueIT extends AbstractJobHandlingIT {
assertEquals("Failed count", NUM_JOBS / 10,
q.getStatistics().getNumberOfFailedJobs());
assertEquals("Cancelled count", 0,
q.getStatistics().getNumberOfCancelledJobs());
}
-}
\ No newline at end of file
+}