You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by kw...@apache.org on 2018/05/29 15:10:13 UTC

[sling-org-apache-sling-servlets-annotations-it] 06/06: SLIGN-7624 add some sleep time to make sure server is really started, add missing license headers

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

kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-servlets-annotations-it.git

commit 2d9b23e6334ed76e0ee2f70adba84deee315c460
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Tue May 29 17:08:50 2018 +0200

    SLIGN-7624 add some sleep time to make sure server is really started,
    add missing license headers
---
 pom.xml                                            | 24 ++++++++++++++++++++--
 .../testservletfilters/SimpleServletFilter.java    | 16 +++++++++++++++
 .../annotations/ServletRegistrationIT.java         |  3 ++-
 3 files changed, 40 insertions(+), 3 deletions(-)

diff --git a/pom.xml b/pom.xml
index 5161587..0d946d2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -20,7 +20,7 @@
         <relativePath/>
     </parent>
 
-    <artifactId>sling-org-apache-sling-servlets-annotations-it</artifactId>
+    <artifactId>org.apache.sling.servlets.annotations.it</artifactId>
     <version>1.0.0-SNAPSHOT</version>
 
     <name>Apache Sling Servlets Annotations IT</name>
@@ -117,6 +117,26 @@
             </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <configuration>
+                    <tasks>
+                        <sleep seconds="10"/>
+                    </tasks>
+                </configuration>
+                <executions>
+                    <execution>
+                        <!-- workaround for https://issues.apache.org/jira/browse/SLING-6543 -->
+                        <id>sleep-until-http-port-is-bound</id>
+                        <phase>pre-integration-test</phase>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-failsafe-plugin</artifactId>
                 <executions>
                     <execution>
@@ -157,7 +177,7 @@
         </dependency>
         <dependency>
             <groupId>org.apache.sling</groupId>
-            <artifactId>sling-org-apache-sling-servlets-annotations</artifactId>
+            <artifactId>org.apache.sling.servlets.annotations</artifactId>
             <version>1.0.0-SNAPSHOT</version>
         </dependency>
 
diff --git a/src/main/java/org/apache/sling/servlets/annotations/testservletfilters/SimpleServletFilter.java b/src/main/java/org/apache/sling/servlets/annotations/testservletfilters/SimpleServletFilter.java
index e1a56f6..b7c653a 100644
--- a/src/main/java/org/apache/sling/servlets/annotations/testservletfilters/SimpleServletFilter.java
+++ b/src/main/java/org/apache/sling/servlets/annotations/testservletfilters/SimpleServletFilter.java
@@ -1,3 +1,19 @@
+/*
+ * 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.servlets.annotations.testservletfilters;
 
 import java.io.IOException;
diff --git a/src/test/java/org/apache/sling/servlets/annotations/ServletRegistrationIT.java b/src/test/java/org/apache/sling/servlets/annotations/ServletRegistrationIT.java
index 6db10ba..81fc4c5 100644
--- a/src/test/java/org/apache/sling/servlets/annotations/ServletRegistrationIT.java
+++ b/src/test/java/org/apache/sling/servlets/annotations/ServletRegistrationIT.java
@@ -67,7 +67,8 @@ public class ServletRegistrationIT {
         // wait until the server is fully started
         CLIENT.waitExists("/index.html", SERVICE_START_TIMEOUT, 500);
         
-        CLIENT.waitServiceRegistered("javax.servlet.Servlet", BUNDLE_SYMBOLICNAME, SERVICE_START_TIMEOUT, 500);
+        // the following method somehow fails sometimes
+        //CLIENT.waitServiceRegistered("javax.servlet.Servlet", BUNDLE_SYMBOLICNAME, SERVICE_START_TIMEOUT, 500);
         CLIENT.waitComponentRegistered("org.apache.sling.servlets.annotations.testservlets.PathBoundServlet", SERVICE_START_TIMEOUT, 500);
         CLIENT.waitComponentRegistered("org.apache.sling.servlets.annotations.testservletfilters.SimpleServletFilter", SERVICE_START_TIMEOUT, 500);
         // wait a bit longer to make sure really all servlets and filters are active

-- 
To stop receiving notification emails like this one, please contact
kwin@apache.org.