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

rombert pushed a commit to annotated tag org.apache.sling.hc.junit.bridge-1.0.2
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-junit-bridge.git

commit 5a6e43599fbbf95c1af0066bb896258a85653cbb
Author: Bertrand Delacretaz <[email protected]>
AuthorDate: Fri Jul 18 13:02:58 2014 +0000

    SLING-3771 - fail if no HCs found
    
    git-svn-id: 
https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/healthcheck/junit-bridge@1611636
 13f79535-47bb-0310-9956-ffa450edef68
---
 src/main/java/org/apache/sling/hc/junitbridge/JUnitTestBridge.java | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/main/java/org/apache/sling/hc/junitbridge/JUnitTestBridge.java 
b/src/main/java/org/apache/sling/hc/junitbridge/JUnitTestBridge.java
index c611c40..412d2d2 100644
--- a/src/main/java/org/apache/sling/hc/junitbridge/JUnitTestBridge.java
+++ b/src/main/java/org/apache/sling/hc/junitbridge/JUnitTestBridge.java
@@ -17,7 +17,11 @@
  */
 package org.apache.sling.hc.junitbridge;
 
+import static org.junit.Assert.fail;
 import static org.junit.Assert.assertNotNull;
+
+import java.util.Arrays;
+
 import junit.framework.TestSuite;
 
 import org.junit.runner.RunWith;
@@ -39,6 +43,9 @@ public class JUnitTestBridge {
         for(ServiceReference ref : 
context.getFilter().getTaggedHealthCheckServiceReferences(context.getTags())) {
             suite.addTest(new HealthCheckTest(context, ref));
         }
+        if(suite.countTestCases() == 0) {
+            fail("No Health Checks found with tags " + 
Arrays.asList(context.getTags()));
+        }
         return suite;
     }
 }
\ No newline at end of file

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

Reply via email to