This is an automated email from the ASF dual-hosted git repository. rombert pushed a commit to annotated tag org.apache.sling.discovery.base-1.1.2 in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-discovery-base.git
commit f2183ef82f5e1ab8f2c5d32c16a591af5f05910a Author: Stefan Egli <[email protected]> AuthorDate: Mon Nov 16 19:46:39 2015 +0000 SLING-5303 : adding a few more loops to avoid a failure that happened on jenkins due to the fact that heartbeatsAndCheckView can throw exceptions when invoked during promotion/other repository changes in a test environment. More loops should help work around that. git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/discovery/base@1714654 13f79535-47bb-0310-9956-ffa450edef68 --- .../sling/discovery/base/its/AbstractClusterTest.java | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/test/java/org/apache/sling/discovery/base/its/AbstractClusterTest.java b/src/test/java/org/apache/sling/discovery/base/its/AbstractClusterTest.java index 0608440..6b25821 100644 --- a/src/test/java/org/apache/sling/discovery/base/its/AbstractClusterTest.java +++ b/src/test/java/org/apache/sling/discovery/base/its/AbstractClusterTest.java @@ -1305,16 +1305,14 @@ public abstract class AbstractClusterTest { instance3 = newBuilder().setDebugName("thirdInstance") .useRepositoryOf(instance1) .build(); - instance1.heartbeatsAndCheckView(); - instance2.heartbeatsAndCheckView(); - instance3.heartbeatsAndCheckView(); - logger.info("testAdditionalInstance: 3rd 2s sleep"); - Thread.sleep(2000); - instance1.heartbeatsAndCheckView(); - instance2.heartbeatsAndCheckView(); - instance3.heartbeatsAndCheckView(); - logger.info("testAdditionalInstance: 4th 2s sleep"); - Thread.sleep(3000); + for(int i=0; i<4; i++) { + instance1.heartbeatsAndCheckView(); + instance2.heartbeatsAndCheckView(); + instance3.heartbeatsAndCheckView(); + logger.info("testAdditionalInstance: i="+i+", 2s sleep"); + Thread.sleep(2000); + } + assertEquals(1, acceptsMultiple.getEventCnt(Type.TOPOLOGY_CHANGING)); assertEquals(1, acceptsMultiple.getEventCnt(Type.TOPOLOGY_CHANGED)); logger.info("testAdditionalInstance: end"); -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
