sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [sling-org-apache-sling-junit-core] kwin commented on a change in pull request #1: [SLING-8246]Fix server side test hang with repeat "Waiting for the following bund…
Date Sun, 05 Jan 2020 12:34:14 GMT
kwin commented on a change in pull request #1: [SLING-8246]Fix server side test hang with repeat
"Waiting for the following bund…
URL: https://github.com/apache/sling-org-apache-sling-junit-core/pull/1#discussion_r363090154
 
 

 ##########
 File path: src/main/java/org/apache/sling/junit/impl/servlet/JUnitServlet.java
 ##########
 @@ -17,33 +17,63 @@
 package org.apache.sling.junit.impl.servlet;
 
 import java.io.IOException;
-import java.util.Dictionary;
 
+import javax.servlet.Servlet;
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.felix.scr.annotations.Component;
-import org.apache.felix.scr.annotations.Property;
-import org.apache.felix.scr.annotations.Reference;
+import org.osgi.service.component.annotations.Activate;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.ConfigurationPolicy;
+import org.osgi.service.component.annotations.Deactivate;
+import org.osgi.service.component.annotations.Modified;
+import org.osgi.service.component.annotations.Reference;
+import org.osgi.framework.Constants;
+import org.osgi.service.component.ComponentContext;
+import org.osgi.service.metatype.annotations.AttributeDefinition;
+import org.osgi.service.metatype.annotations.Designate;
+import org.osgi.service.metatype.annotations.ObjectClassDefinition;
 import org.apache.sling.junit.RendererSelector;
 import org.apache.sling.junit.TestsManager;
-import org.osgi.service.component.ComponentContext;
 import org.osgi.service.http.HttpService;
 import org.osgi.service.http.NamespaceException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /** Simple test runner servlet */
 @SuppressWarnings("serial")
-@Component(immediate=true, metatype=true)
+@Component(
+    service = Servlet.class,
+    immediate = true,
+    configurationPolicy = ConfigurationPolicy.OPTIONAL,
+    property = {
+        Constants.SERVICE_DESCRIPTION+"=Service that gives access to JUnit test classes",
+        "servlet.path=/system/sling/junit",
 
 Review comment:
   this is already set via component property type

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message