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 dea0499  SLING-12078 : adding 2sec delays as workaround to 
TOPOLOGY_INIT/addJob race condition
dea0499 is described below

commit dea04990b770a92f29c2504aa33d8158d68da58f
Author: Stefan Egli <[email protected]>
AuthorDate: Thu Oct 5 17:21:20 2023 +0200

    SLING-12078 : adding 2sec delays as workaround to TOPOLOGY_INIT/addJob race 
condition
---
 src/test/java/org/apache/sling/event/it/HistoryIT.java | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/test/java/org/apache/sling/event/it/HistoryIT.java 
b/src/test/java/org/apache/sling/event/it/HistoryIT.java
index 5c1895c..d97c190 100644
--- a/src/test/java/org/apache/sling/event/it/HistoryIT.java
+++ b/src/test/java/org/apache/sling/event/it/HistoryIT.java
@@ -29,6 +29,7 @@ import org.apache.sling.event.jobs.QueueConfiguration;
 import org.apache.sling.event.jobs.consumer.JobExecutionContext;
 import org.apache.sling.event.jobs.consumer.JobExecutionResult;
 import org.apache.sling.event.jobs.consumer.JobExecutor;
+import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.ops4j.pax.exam.Configuration;
@@ -73,6 +74,11 @@ public class HistoryIT extends AbstractJobHandlingIT {
         return jobManager.addJob(TOPIC, props );
     }
 
+    @Before
+    public void additionalStartupDelay() throws InterruptedException {
+        Thread.sleep(2000);
+    }
+
     /**
      * Test history.
      * Start 10 jobs and cancel some of them and succeed others

Reply via email to