This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag 
org.apache.sling.discovery.commons-1.0.10
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-discovery-commons.git

commit ca87b3df0653eb75ad6d2b2c0a1ec06e9c9f72c6
Author: Stefan Egli <[email protected]>
AuthorDate: Wed Nov 18 16:34:00 2015 +0000

    SLING-5310 : replaced waitForAsyncEvents(4sec) with Thread.sleep(4sec) then 
another waitForAsyncEvents(2sec) to avoid making the assertion just when the 
event would yet be triggered
    
    git-svn-id: 
https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/discovery/commons@1715019
 13f79535-47bb-0310-9956-ffa450edef68
---
 .../discovery/commons/providers/base/TestMinEventDelayHandler.java  | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git 
a/src/test/java/org/apache/sling/discovery/commons/providers/base/TestMinEventDelayHandler.java
 
b/src/test/java/org/apache/sling/discovery/commons/providers/base/TestMinEventDelayHandler.java
index 002fc7e..0b868ea 100644
--- 
a/src/test/java/org/apache/sling/discovery/commons/providers/base/TestMinEventDelayHandler.java
+++ 
b/src/test/java/org/apache/sling/discovery/commons/providers/base/TestMinEventDelayHandler.java
@@ -117,8 +117,10 @@ public class TestMinEventDelayHandler {
         TestHelper.assertNoEvents(listener);
         // make sure the MinEventDelayHandler finds a topology when coming 
back from the delaying, so:
         sds.setTopoology(view2);
-        logger.info("testReactivate: waiting for async events to have been 
processed - max 4sec");
-        assertEquals(0, mgr.waitForAsyncEvents(4000));
+        logger.info("testReactivate: waiting for async events to have been 
processed - 4sec");
+        Thread.sleep(4000);
+        logger.info("testReactivate: waiting for async events to have been 
processed - max another 2sec");
+        assertEquals(0, mgr.waitForAsyncEvents(2000));
         logger.info("testReactivate: asserting CHANGED event");
         TestHelper.assertEvents(mgr, listener, 
EventHelper.newChangedEvent(view1, view2));
         

-- 
To stop receiving notification emails like this one, please contact
"[email protected]" <[email protected]>.

Reply via email to