This is an automated email from the ASF dual-hosted git repository. rombert pushed a commit to annotated tag org.apache.sling.crankstart.launcher-1.0.0 in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-crankstart-launcher.git
commit 1de5fcf54d7ea4a47ce7a9d5702e6035582d89f0 Author: Bertrand Delacretaz <[email protected]> AuthorDate: Fri May 16 12:36:55 2014 +0000 config.factory support git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/contrib/crankstart/launcher@1595177 13f79535-47bb-0310-9956-ffa450edef68 --- .../crankstart/launcher/CrankstartBootstrapTest.java | 12 ++++++++---- .../{launcher-test.txt => launcher-test.crank.txt} | 19 +++++++++++++------ 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/src/test/java/org/apache/sling/crankstart/launcher/CrankstartBootstrapTest.java b/src/test/java/org/apache/sling/crankstart/launcher/CrankstartBootstrapTest.java index 5e0fb50..ff12860 100644 --- a/src/test/java/org/apache/sling/crankstart/launcher/CrankstartBootstrapTest.java +++ b/src/test/java/org/apache/sling/crankstart/launcher/CrankstartBootstrapTest.java @@ -18,7 +18,6 @@ import org.apache.sling.commons.testing.junit.Retry; import org.apache.sling.commons.testing.junit.RetryRule; import org.junit.AfterClass; import org.junit.BeforeClass; -import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; @@ -31,7 +30,7 @@ public class CrankstartBootstrapTest { private static final HttpClient client = new HttpClient(); private static Thread crankstartThread; private static String baseUrl = "http://localhost:" + port; - public static final String TEST_RESOURCE = "/launcher-test.txt"; + public static final String TEST_RESOURCE = "/launcher-test.crank.txt"; @Rule public final RetryRule retryRule = new RetryRule(); @@ -107,13 +106,18 @@ public class CrankstartBootstrapTest { public void testSingleConfigServlet() throws Exception { final GetMethod get = new GetMethod(baseUrl + "/single"); client.executeMethod(get); - assertEquals("Expecting success " + get.getURI(), 200, get.getStatusCode()); + assertEquals("Expecting success for " + get.getURI(), 200, get.getStatusCode()); } @Test @Retry(timeoutMsec=10000, intervalMsec=250) - @Ignore("TODO - activate once we support config factories") public void testConfigFactoryServlet() throws Exception { + final String [] paths = { "/foo", "/bar/test" }; + for(String path : paths) { + final GetMethod get = new GetMethod(baseUrl + path); + client.executeMethod(get); + assertEquals("Expecting success for " + get.getURI(), 200, get.getStatusCode()); + } } private static String getOsgiStoragePath() { diff --git a/src/test/resources/launcher-test.txt b/src/test/resources/launcher-test.crank.txt similarity index 73% rename from src/test/resources/launcher-test.txt rename to src/test/resources/launcher-test.crank.txt index d1868c5..8af6a32 100644 --- a/src/test/resources/launcher-test.txt +++ b/src/test/resources/launcher-test.crank.txt @@ -2,14 +2,12 @@ # server with a few servlets that require specific OSGi configurations # Default values for our variables -defaults pax.version 1.6.0 defaults single.path /single +defaults felix.http.jetty.version 2.2.0 -# Bootstrap classpath +# Bootstrap classpath (variables are not supported here) classpath mvn:org.apache.felix/org.apache.felix.framework/4.4.0 classpath mvn:org.slf4j/slf4j-api/1.6.2 -classpath mvn:org.ops4j.pax.url/pax-url-aether/${pax.version} -classpath mvn:org.ops4j.pax.url/pax-url-commons/${pax.version} classpath mvn:org.apache.sling/org.apache.sling.crankstart.core/0.0.1-SNAPSHOT classpath mvn:org.apache.sling/org.apache.sling.crankstart.api/0.0.1-SNAPSHOT @@ -21,9 +19,10 @@ osgi.property org.osgi.framework.storage ${osgi.storage.path} start.framework # Start ConfigAdmin, HTTP service and SCR -bundle mvn:org.apache.felix/org.apache.felix.http.jetty/2.2.0 +bundle mvn:org.apache.felix/org.apache.felix.http.jetty/${felix.http.jetty.version} bundle mvn:org.apache.felix/org.apache.felix.eventadmin/1.3.2 bundle mvn:org.apache.felix/org.apache.felix.scr/1.8.2 +bundle mvn:org.apache.felix/org.apache.felix.metatype/1.0.10 bundle mvn:org.apache.sling/org.apache.sling.commons.osgi/2.2.1-SNAPSHOT bundle mvn:org.apache.sling/org.apache.sling.commons.log/2.1.2 bundle mvn:org.apache.sling/org.apache.sling.crankstart.test.services/0.0.1-SNAPSHOT @@ -35,5 +34,13 @@ config org.apache.sling.crankstart.testservices.SingleConfigServlet path=${single.path} message=doesn't matter +config.factory org.apache.sling.crankstart.testservices.ConfigFactoryServlet + path=/foo + message=Not used + +config.factory org.apache.sling.crankstart.testservices.ConfigFactoryServlet + path=/bar/test + message=Not used + # Informative log -log felix http service should come up at http://localhost:${http.port} +log felix http service should come up at http://localhost:${http.port} \ No newline at end of file -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
