You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 09:52:02 UTC

[sling-org-apache-sling-junit-healthcheck] annotated tag org.apache.sling.junit.healthcheck-1.0.6 created (now e11ac0a)

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

rombert pushed a change to annotated tag org.apache.sling.junit.healthcheck-1.0.6
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-junit-healthcheck.git.


      at e11ac0a  (tag)
 tagging d2fc60a0b43c5b885fcb59716abd5b9b0acfe5e7 (commit)
      by Bertrand Delacretaz
      on Thu Sep 26 15:20:59 2013 +0000

- Log -----------------------------------------------------------------
org.apache.sling.junit.healthcheck-1.0.6
-----------------------------------------------------------------------

This annotated tag includes the following new commits:

     new 96339dd  SLING-3108 - JUnit-based health checks
     new 7d36558  [maven-release-plugin] prepare release org.apache.sling.hc.core-1.0.0
     new a07f718  [maven-release-plugin] prepare for next development iteration
     new eaee7ee  [maven-release-plugin] prepare release org.apache.sling.hc.core-1.0.2
     new 5ac5135  [maven-release-plugin] prepare for next development iteration
     new 1c00871  SLING-3127 - prepare for release
     new f3cfd3e  [maven-release-plugin] prepare release org.apache.sling.junit.healthcheck-1.0.4
     new ebeec3d  [maven-release-plugin] prepare for next development iteration
     new c55800a  SLING-3127 - fix scm info
     new 68e6360  [maven-release-plugin] prepare release org.apache.sling.junit.healthcheck-1.0.6
     new d2fc60a  [maven-release-plugin]  copy for tag org.apache.sling.junit.healthcheck-1.0.6

The 11 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


-- 
To stop receiving notification emails like this one, please contact
['"commits@sling.apache.org" <co...@sling.apache.org>'].

[sling-org-apache-sling-junit-healthcheck] 05/11: [maven-release-plugin] prepare for next development iteration

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 5ac5135fa7da5eacef214a33225f1b81becc0f11
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Thu Sep 26 14:42:46 2013 +0000

    [maven-release-plugin] prepare for next development iteration
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/junit/healthcheck@1526515 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/pom.xml b/pom.xml
index ae29196..600677f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,16 +28,16 @@
     </parent>
 
     <artifactId>org.apache.sling.junit.healthcheck</artifactId>
-    <version>1.0.2</version>
+    <version>1.0.3-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <name>Apache Sling JUnit Health Checks</name>
     <description>Sling Health Check services that run JUnit tests</description>
     
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.hc.core-1.0.2/testing/junit/remote</connection>
-        <developerConnection> scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.hc.core-1.0.2/testing/junit/remote</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.hc.core-1.0.2/testing/junit/remote</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/testing/junit/remote</connection>
+        <developerConnection> scm:svn:https://svn.apache.org/repos/asf/sling/trunk/testing/junit/remote</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/trunk/testing/junit/remote</url>
     </scm>
 
     <build>
@@ -104,7 +104,7 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.hc.core</artifactId>
-            <version>1.0.2</version>
+            <version>1.0.3-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
         <dependency>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-junit-healthcheck] 10/11: [maven-release-plugin] prepare release org.apache.sling.junit.healthcheck-1.0.6

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 68e6360fa39b42e7bbc224244df6f6cf41ec11a9
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Thu Sep 26 15:20:39 2013 +0000

    [maven-release-plugin] prepare release org.apache.sling.junit.healthcheck-1.0.6
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/junit/healthcheck@1526563 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index 48e455e..eebd1bf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,16 +28,16 @@
     </parent>
 
     <artifactId>org.apache.sling.junit.healthcheck</artifactId>
-    <version>1.0.5-SNAPSHOT</version>
+    <version>1.0.6</version>
     <packaging>bundle</packaging>
 
     <name>Apache Sling JUnit Health Checks</name>
     <description>Sling Health Check services that run JUnit tests</description>
     
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/testing/junit/healthcheck</connection>
-        <developerConnection> scm:svn:https://svn.apache.org/repos/asf/sling/trunk/testing/junit/healthcheck</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/trunk/testing/junit/healthcheck</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.junit.healthcheck-1.0.6</connection>
+        <developerConnection> scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.junit.healthcheck-1.0.6</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.junit.healthcheck-1.0.6</url>
     </scm>
 
     <build>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-junit-healthcheck] 04/11: [maven-release-plugin] prepare release org.apache.sling.hc.core-1.0.2

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit eaee7eea331159dd0ad508beccce645dc04e56ba
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Thu Sep 26 14:41:41 2013 +0000

    [maven-release-plugin] prepare release org.apache.sling.hc.core-1.0.2
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/junit/healthcheck@1526513 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/pom.xml b/pom.xml
index bda99f8..ae29196 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,16 +28,16 @@
     </parent>
 
     <artifactId>org.apache.sling.junit.healthcheck</artifactId>
-    <version>1.0.1-SNAPSHOT</version>
+    <version>1.0.2</version>
     <packaging>bundle</packaging>
 
     <name>Apache Sling JUnit Health Checks</name>
     <description>Sling Health Check services that run JUnit tests</description>
     
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/testing/junit/remote</connection>
-        <developerConnection> scm:svn:https://svn.apache.org/repos/asf/sling/trunk/testing/junit/remote</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/trunk/testing/junit/remote</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.hc.core-1.0.2/testing/junit/remote</connection>
+        <developerConnection> scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.hc.core-1.0.2/testing/junit/remote</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.hc.core-1.0.2/testing/junit/remote</url>
     </scm>
 
     <build>
@@ -104,7 +104,7 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.hc.core</artifactId>
-            <version>1.0.1-SNAPSHOT</version>
+            <version>1.0.2</version>
             <scope>provided</scope>
         </dependency>
         <dependency>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-junit-healthcheck] 01/11: SLING-3108 - JUnit-based health checks

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 96339dd27cdbc597e2d3ff54c9a2e76ab368c86d
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Tue Sep 24 21:22:21 2013 +0000

    SLING-3108 - JUnit-based health checks
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/junit/healthcheck@1526015 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml                                            | 115 ++++++++++++++
 .../junit/healthcheck/impl/JUnitHealthCheck.java   | 174 +++++++++++++++++++++
 .../junit/healthcheck/impl/JUnitTestSelector.java  |  52 ++++++
 .../OSGI-INF/metatype/metatype.properties          |  44 ++++++
 .../healthcheck/impl/JUnitTestSelectorTest.java    |  47 ++++++
 5 files changed, 432 insertions(+)

diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..e988e81
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+    
+    http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.sling</groupId>
+        <artifactId>sling</artifactId>
+        <version>18</version>
+        <relativePath>../../../parent/pom.xml</relativePath>
+    </parent>
+
+    <artifactId>org.apache.sling.junit.healthcheck</artifactId>
+    <version>0.0.9-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+
+    <name>Apache Sling JUnit Health Checks</name>
+    <description>Sling Health Check services that run JUnit tests</description>
+    
+    <scm>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/testing/junit/remote</connection>
+        <developerConnection> scm:svn:https://svn.apache.org/repos/asf/sling/trunk/testing/junit/remote</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/trunk/testing/junit/remote</url>
+    </scm>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-scr-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Export-Package>
+                            org.apache.sling.junit.remote.exported.*,
+                            org.apache.sling.junit.remote.ide.*
+                        </Export-Package>
+                        <Import-Package>
+                            org.apache.http.*; resolution:=optional,
+                            org.apache.sling.testing.tools.http; resolution:=optional,
+                            org.junit.internal.*; resolution:=optional,
+                            *
+                        </Import-Package>
+                        <Sling-Test-Regexp>.*Test</Sling-Test-Regexp>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+    
+    <dependencies>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.sling</groupId>
+            <artifactId>org.apache.sling.junit.core</artifactId>
+            <version>1.0.8</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.scr.annotations</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.8.2</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <version>1.5.11</version>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-simple</artifactId>
+            <version>1.5.11</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.sling</groupId>
+            <artifactId>org.apache.sling.hc.core</artifactId>
+            <version>0.0.2-SNAPSHOT</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/src/main/java/org/apache/sling/junit/healthcheck/impl/JUnitHealthCheck.java b/src/main/java/org/apache/sling/junit/healthcheck/impl/JUnitHealthCheck.java
new file mode 100644
index 0000000..ad1f2e9
--- /dev/null
+++ b/src/main/java/org/apache/sling/junit/healthcheck/impl/JUnitHealthCheck.java
@@ -0,0 +1,174 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The SF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ */
+
+package org.apache.sling.junit.healthcheck.impl;
+
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.util.Collection;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.felix.scr.annotations.Activate;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.ConfigurationPolicy;
+import org.apache.felix.scr.annotations.Properties;
+import org.apache.felix.scr.annotations.Property;
+import org.apache.felix.scr.annotations.PropertyUnbounded;
+import org.apache.felix.scr.annotations.Reference;
+import org.apache.felix.scr.annotations.Service;
+import org.apache.sling.hc.api.HealthCheck;
+import org.apache.sling.hc.api.Result;
+import org.apache.sling.hc.util.FormattingResultLog;
+import org.apache.sling.junit.Renderer;
+import org.apache.sling.junit.TestSelector;
+import org.apache.sling.junit.TestsManager;
+import org.junit.runner.Description;
+import org.junit.runner.notification.Failure;
+import org.junit.runner.notification.RunListener;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/** HealthCheck that executes JUnit tests */
+@Component(
+        configurationFactory=true,
+        policy=ConfigurationPolicy.REQUIRE,
+        metatype=true)
+@Properties({
+    @Property(name=HealthCheck.NAME),
+    @Property(name=HealthCheck.TAGS, unbounded=PropertyUnbounded.ARRAY),
+    @Property(name=HealthCheck.MBEAN_NAME)
+})
+@Service(value=HealthCheck.class)
+public class JUnitHealthCheck implements HealthCheck {
+
+    private final Logger log = LoggerFactory.getLogger(getClass());
+    
+    @Reference
+    private TestsManager testsManager;
+    
+    @Property
+    public static final String TEST_PACKAGE_OR_CLASS_PROP = "test.package.or.class";
+    private TestSelector testSelector;
+    
+    @Property
+    public static final String TEST_METHOD = "test.method";
+ 
+    private static class CustomRunListener extends RunListener {
+        
+        private final FormattingResultLog resultLog;
+        int nTests; 
+        
+        CustomRunListener(FormattingResultLog resultLog) {
+            this.resultLog = resultLog;
+        }
+        
+        @Override
+        public void testFailure(Failure failure) throws Exception {
+            super.testFailure(failure);
+            resultLog.warn(failure.getMessage());
+        }
+
+        @Override
+        public void testFinished(Description description) throws Exception {
+            super.testFinished(description);
+            resultLog.debug("Test finished: {}", description);
+            nTests++;
+        }
+    }
+
+    private static class CustomRenderer implements Renderer {
+
+        private final String extension;
+        private final RunListener listener;
+        private final FormattingResultLog resultLog;
+        
+        CustomRenderer(RunListener listener, String extension, FormattingResultLog resultLog) {
+            this.extension = extension;
+            this.listener = listener;
+            this.resultLog = resultLog;
+        }
+        
+        public boolean appliesTo(TestSelector ts) {
+            return true;
+        }
+
+        public void cleanup() {
+        }
+
+        public String getExtension() {
+            return extension;
+        }
+
+        public RunListener getRunListener() {
+            return listener;
+        }
+
+        public void info(String role, String info) {
+            resultLog.info(info);
+        }
+
+        public void link(String arg0, String arg1, String arg2) {
+        }
+
+        public void list(String arg0, Collection<String> arg1) {
+        }
+
+        public void setup(HttpServletResponse arg0, String arg1) throws IOException, UnsupportedEncodingException {
+        }
+
+        public void title(int arg0, String arg1) {
+        }
+    }
+    
+    @Activate
+    public void activate(final Map<String, Object> properties) {
+        final String extension = "json";
+        final Object o = properties.get(TEST_METHOD);
+        final String testMethod = o == null ? "" : o.toString();
+        testSelector = new JUnitTestSelector(
+                String.valueOf(properties.get(TEST_PACKAGE_OR_CLASS_PROP)), 
+                testMethod, 
+                extension);
+        log.info("Activated with TestSelector={}", testSelector);
+    }
+    
+    public Result execute() {
+        final String extension ="json";
+        final FormattingResultLog resultLog = new FormattingResultLog();
+        final CustomRunListener listener = new CustomRunListener(resultLog);
+        final Renderer r = new CustomRenderer(listener, extension, resultLog);
+        final Collection<String> testNames = testsManager.getTestNames(testSelector);
+        if(testNames.isEmpty()) {
+            resultLog.warn("No tests found for selector {}", testSelector);
+        } else {
+            try {
+                testsManager.executeTests(testNames, r, testSelector);
+                if(listener.nTests == 0) {
+                    resultLog.warn("No tests executed by {}", testSelector);
+                }
+            } catch(Exception e) {
+                resultLog.warn("Exception while executing tests (" + testSelector + ")" + e);
+            }
+        }
+        
+        return new Result(resultLog);
+    }
+    
+}
diff --git a/src/main/java/org/apache/sling/junit/healthcheck/impl/JUnitTestSelector.java b/src/main/java/org/apache/sling/junit/healthcheck/impl/JUnitTestSelector.java
new file mode 100644
index 0000000..89540e7
--- /dev/null
+++ b/src/main/java/org/apache/sling/junit/healthcheck/impl/JUnitTestSelector.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sling.junit.healthcheck.impl;
+
+import org.apache.sling.junit.TestSelector;
+
+class JUnitTestSelector implements TestSelector {
+
+    private final String testPackageOrClass;
+    private final String testMethod;
+    private final String extension;
+    
+    JUnitTestSelector(String testPackageOrClass, String testMethod, String extension) {
+        this.testPackageOrClass = testPackageOrClass;
+        this.testMethod = testMethod;
+        this.extension = extension;
+    }
+    
+    public boolean acceptTestName(String name) {
+        return name.startsWith(testPackageOrClass);
+    }
+
+    public String getExtension() {
+        return extension;
+    }
+
+    public String getSelectedTestMethodName() {
+        return testMethod;
+    }
+
+    public String getTestSelectorString() {
+        return testPackageOrClass + (testMethod == null ? "" : "#" + testMethod); 
+    }
+    
+    public String toString() {
+        return getTestSelectorString();
+    }
+}
diff --git a/src/main/resources/OSGI-INF/metatype/metatype.properties b/src/main/resources/OSGI-INF/metatype/metatype.properties
new file mode 100644
index 0000000..315b797
--- /dev/null
+++ b/src/main/resources/OSGI-INF/metatype/metatype.properties
@@ -0,0 +1,44 @@
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+#
+
+#
+# This file contains localization strings for configuration labels and
+# descriptions as used in the metatype.xml descriptor generated by the
+# the Sling SCR plugin
+
+org.apache.sling.junit.healthcheck.impl.name = JUnit Health Check 
+org.apache.sling.junit.healthcheck.impl.description = Health Check that executes JUnit tests
+    
+hc.mbean.name.name = MBean name
+hc.mbean.name.description = Name of the MBean to create for this Health Check.
+
+hc.tags.name = Health Check tags
+hc.tags.description = List of tags for this Health Check service, used to select \
+    subsets of Health Check services for execution.
+
+hc.name.name = Health Check Name
+hc.name.description = Name of this Health Check service. Used for the MBean that's created \
+    for this Health Check as well, unless a specific MBean name is configured.
+
+test.package.or.class.name = Test package or class
+test.package.or.class.description = Package or class name to use to select which tests \
+    to execute.
+
+test.method.name = Test method
+test.method.description = Name of a specific test method to execute (optional).
\ No newline at end of file
diff --git a/src/test/java/org/apache/sling/junit/healthcheck/impl/JUnitTestSelectorTest.java b/src/test/java/org/apache/sling/junit/healthcheck/impl/JUnitTestSelectorTest.java
new file mode 100644
index 0000000..c54ce89
--- /dev/null
+++ b/src/test/java/org/apache/sling/junit/healthcheck/impl/JUnitTestSelectorTest.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sling.junit.healthcheck.impl;
+
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertFalse;
+
+public class JUnitTestSelectorTest {
+    
+    @Test
+    public void testSelectorString() {
+        assertEquals("com.example.foo", new JUnitTestSelector("com.example.foo",  null, null).getTestSelectorString());
+        assertEquals("com.example.testing#someMethod", new JUnitTestSelector("com.example.testing", "someMethod", null).getTestSelectorString());
+    }
+    
+    @Test
+    public void testNoMethod() {
+        final JUnitTestSelector s = new JUnitTestSelector("com.example.foo",  null, null);
+        assertTrue("Expecting package to be selected", s.acceptTestName("com.example.foo"));
+        assertTrue("Expecting subpackage to be selected", s.acceptTestName("com.example.foo.bar"));
+        assertTrue("Expecting class to be selected", s.acceptTestName("com.example.foo.some.ThisClass"));
+        assertFalse("Expecting other package.accept to return false", s.acceptTestName("com.other.foo"));
+    }
+    
+    @Test
+    public void testWithMethod() {
+        final JUnitTestSelector s = new JUnitTestSelector("com.example.foo",  "someMethod", null);
+        assertTrue("Expecting package to be selected", s.acceptTestName("com.example.foo"));
+        assertEquals("someMethod", s.getSelectedTestMethodName());
+    }
+}

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-junit-healthcheck] 07/11: [maven-release-plugin] prepare release org.apache.sling.junit.healthcheck-1.0.4

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit f3cfd3ede8b27c49709c8ab2ad673b33bdc0c0ff
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Thu Sep 26 15:12:42 2013 +0000

    [maven-release-plugin] prepare release org.apache.sling.junit.healthcheck-1.0.4
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/junit/healthcheck@1526556 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index 9deb611..f4c067c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,16 +28,16 @@
     </parent>
 
     <artifactId>org.apache.sling.junit.healthcheck</artifactId>
-    <version>1.0.3-SNAPSHOT</version>
+    <version>1.0.4</version>
     <packaging>bundle</packaging>
 
     <name>Apache Sling JUnit Health Checks</name>
     <description>Sling Health Check services that run JUnit tests</description>
     
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/testing/junit/remote</connection>
-        <developerConnection> scm:svn:https://svn.apache.org/repos/asf/sling/trunk/testing/junit/remote</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/trunk/testing/junit/remote</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.junit.healthcheck-1.0.4</connection>
+        <developerConnection> scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.junit.healthcheck-1.0.4</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.junit.healthcheck-1.0.4</url>
     </scm>
 
     <build>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-junit-healthcheck] 09/11: SLING-3127 - fix scm info

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit c55800ac5987e4afd1120fdfd753d929d9cf4802
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Thu Sep 26 15:18:24 2013 +0000

    SLING-3127 - fix scm info
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/junit/healthcheck@1526562 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pom.xml b/pom.xml
index 66d0741..48e455e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -35,9 +35,9 @@
     <description>Sling Health Check services that run JUnit tests</description>
     
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/testing/junit/remote</connection>
-        <developerConnection> scm:svn:https://svn.apache.org/repos/asf/sling/trunk/testing/junit/remote</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/trunk/testing/junit/remote</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/testing/junit/healthcheck</connection>
+        <developerConnection> scm:svn:https://svn.apache.org/repos/asf/sling/trunk/testing/junit/healthcheck</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/trunk/testing/junit/healthcheck</url>
     </scm>
 
     <build>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-junit-healthcheck] 03/11: [maven-release-plugin] prepare for next development iteration

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit a07f718199c1c6c4b9bc70b61536dd350866962a
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Thu Sep 26 14:29:30 2013 +0000

    [maven-release-plugin] prepare for next development iteration
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/junit/healthcheck@1526509 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/pom.xml b/pom.xml
index 6c7126b..bda99f8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,16 +28,16 @@
     </parent>
 
     <artifactId>org.apache.sling.junit.healthcheck</artifactId>
-    <version>1.0.0</version>
+    <version>1.0.1-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <name>Apache Sling JUnit Health Checks</name>
     <description>Sling Health Check services that run JUnit tests</description>
     
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.hc.core-1.0.0/testing/junit/remote</connection>
-        <developerConnection> scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.hc.core-1.0.0/testing/junit/remote</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.hc.core-1.0.0/testing/junit/remote</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/testing/junit/remote</connection>
+        <developerConnection> scm:svn:https://svn.apache.org/repos/asf/sling/trunk/testing/junit/remote</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/trunk/testing/junit/remote</url>
     </scm>
 
     <build>
@@ -104,7 +104,7 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.hc.core</artifactId>
-            <version>1.0.0</version>
+            <version>1.0.1-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
         <dependency>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-junit-healthcheck] 11/11: [maven-release-plugin] copy for tag org.apache.sling.junit.healthcheck-1.0.6

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit d2fc60a0b43c5b885fcb59716abd5b9b0acfe5e7
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Thu Sep 26 15:20:59 2013 +0000

    [maven-release-plugin]  copy for tag org.apache.sling.junit.healthcheck-1.0.6
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.junit.healthcheck-1.0.6@1526564 13f79535-47bb-0310-9956-ffa450edef68

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-junit-healthcheck] 08/11: [maven-release-plugin] prepare for next development iteration

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit ebeec3de0543b246556ab59b9142f25a2490ebae
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Thu Sep 26 15:13:03 2013 +0000

    [maven-release-plugin] prepare for next development iteration
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/junit/healthcheck@1526558 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index f4c067c..66d0741 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,16 +28,16 @@
     </parent>
 
     <artifactId>org.apache.sling.junit.healthcheck</artifactId>
-    <version>1.0.4</version>
+    <version>1.0.5-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <name>Apache Sling JUnit Health Checks</name>
     <description>Sling Health Check services that run JUnit tests</description>
     
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.junit.healthcheck-1.0.4</connection>
-        <developerConnection> scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.junit.healthcheck-1.0.4</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.junit.healthcheck-1.0.4</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/testing/junit/remote</connection>
+        <developerConnection> scm:svn:https://svn.apache.org/repos/asf/sling/trunk/testing/junit/remote</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/trunk/testing/junit/remote</url>
     </scm>
 
     <build>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-junit-healthcheck] 06/11: SLING-3127 - prepare for release

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 1c008714f232d9e13a472e31c7ca8ea4ab6fc756
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Thu Sep 26 15:11:57 2013 +0000

    SLING-3127 - prepare for release
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/junit/healthcheck@1526555 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 600677f..9deb611 100644
--- a/pom.xml
+++ b/pom.xml
@@ -104,7 +104,7 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.hc.core</artifactId>
-            <version>1.0.3-SNAPSHOT</version>
+            <version>1.0.4</version>
             <scope>provided</scope>
         </dependency>
         <dependency>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-junit-healthcheck] 02/11: [maven-release-plugin] prepare release org.apache.sling.hc.core-1.0.0

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 7d365585f5d1f80bea394c83148f99b29605140c
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Thu Sep 26 14:28:11 2013 +0000

    [maven-release-plugin] prepare release org.apache.sling.hc.core-1.0.0
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/junit/healthcheck@1526506 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/pom.xml b/pom.xml
index e988e81..6c7126b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,16 +28,16 @@
     </parent>
 
     <artifactId>org.apache.sling.junit.healthcheck</artifactId>
-    <version>0.0.9-SNAPSHOT</version>
+    <version>1.0.0</version>
     <packaging>bundle</packaging>
 
     <name>Apache Sling JUnit Health Checks</name>
     <description>Sling Health Check services that run JUnit tests</description>
     
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/testing/junit/remote</connection>
-        <developerConnection> scm:svn:https://svn.apache.org/repos/asf/sling/trunk/testing/junit/remote</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/trunk/testing/junit/remote</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.hc.core-1.0.0/testing/junit/remote</connection>
+        <developerConnection> scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.hc.core-1.0.0/testing/junit/remote</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.hc.core-1.0.0/testing/junit/remote</url>
     </scm>
 
     <build>
@@ -104,7 +104,7 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.hc.core</artifactId>
-            <version>0.0.2-SNAPSHOT</version>
+            <version>1.0.0</version>
             <scope>provided</scope>
         </dependency>
         <dependency>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.