You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ss...@apache.org on 2021/12/01 16:54:00 UTC

[sling-org-apache-sling-models-integration-tests] branch feature/SLING-10948-update-integration-tests created (now 81d8047)

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

sseifert pushed a change to branch feature/SLING-10948-update-integration-tests
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-models-integration-tests.git.


      at 81d8047  organize imports

This branch includes the following new commits:

     new a3e26e5  update to java 8
     new 4e4baea  switch to slingstart-maven-plugin and sling 11
     new 6f5cf84  cleanup dependencies
     new 461ca6d  update dependencies
     new 81d8047  organize imports

The 5 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.


[sling-org-apache-sling-models-integration-tests] 03/05: cleanup dependencies

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

sseifert pushed a commit to branch feature/SLING-10948-update-integration-tests
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-models-integration-tests.git

commit 6f5cf841044205e18e274eb939e8a97f09195a83
Author: Stefan Seifert <st...@users.noreply.github.com>
AuthorDate: Wed Dec 1 17:30:24 2021 +0100

    cleanup dependencies
---
 pom.xml | 58 ++++++++++++++++++----------------------------------------
 1 file changed, 18 insertions(+), 40 deletions(-)

diff --git a/pom.xml b/pom.xml
index 440ea4b..a29a100 100644
--- a/pom.xml
+++ b/pom.xml
@@ -220,6 +220,7 @@
             <artifactId>osgi.cmpn</artifactId>
             <scope>provided</scope>
         </dependency>
+
         <!-- Additional bundles needed by the Sling instance under test -->
         <dependency>
             <groupId>org.apache.sling</groupId>
@@ -240,12 +241,6 @@
             <scope>test</scope>
         </dependency>
         <dependency>
-          <groupId>org.apache.sling</groupId>
-          <artifactId>org.apache.sling.commons.johnzon</artifactId>
-          <version>1.0.0</version>
-          <scope>provided</scope>
-        </dependency>
-        <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.engine</artifactId>
             <version>2.2.0</version>
@@ -269,38 +264,6 @@
             <version>1.0.9-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
-        <dependency>
-            <groupId>com.fasterxml.jackson.core</groupId>
-            <artifactId>jackson-databind</artifactId>
-            <version>2.3.2</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>com.fasterxml.jackson.core</groupId>
-            <artifactId>jackson-core</artifactId>
-            <version>2.3.2</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>com.fasterxml.jackson.core</groupId>
-            <artifactId>jackson-annotations</artifactId>
-            <version>2.3.2</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.commons</groupId>
-            <artifactId>commons-lang3</artifactId>
-            <version>3.4</version>
-            <scope>provided</scope>
-        </dependency>
-
-        <!-- not part of launchpad 7 (see SLING-4710) -->
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-atinject_1.0_spec</artifactId>
-            <version>1.0</version>
-            <scope>provided</scope>
-        </dependency>
         
         <!-- actual dependencies -->
         <dependency>
@@ -311,6 +274,7 @@
         <dependency>
             <groupId>javax.jcr</groupId>
             <artifactId>jcr</artifactId>
+            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.sling</groupId>
@@ -325,20 +289,32 @@
             <scope>provided</scope>
         </dependency>
         <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-annotations</artifactId>
+            <version>2.3.2</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-atinject_1.0_spec</artifactId>
+            <version>1.0</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-api</artifactId>
             <version>1.6.6</version>
+            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-simple</artifactId>
-            <scope>test</scope>
             <version>1.6.6</version>
+            <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
-            <version>4.12</version>
             <scope>test</scope>
         </dependency>
         <dependency>
@@ -348,6 +324,7 @@
             <scope>provided</scope>
         </dependency>
     </dependencies>
+
     <profiles>
         <profile>
             <id>debug-remote-process</id>
@@ -362,4 +339,5 @@
             </properties>
         </profile>
     </profiles>
+
 </project>

[sling-org-apache-sling-models-integration-tests] 02/05: switch to slingstart-maven-plugin and sling 11

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

sseifert pushed a commit to branch feature/SLING-10948-update-integration-tests
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-models-integration-tests.git

commit 4e4baea0a829a4aea02ac41d6cf4a999ee0076a2
Author: Stefan Seifert <st...@users.noreply.github.com>
AuthorDate: Wed Dec 1 16:29:37 2021 +0100

    switch to slingstart-maven-plugin and sling 11
---
 pom.xml                                            | 216 +++++++--------------
 .../sling/models/testing/helper/FakeRequest.java   |  97 ++++++++-
 .../sling/models/testing/helper/FakeResponse.java  |  28 ++-
 .../sling/models/testing/rtbound/FakeRequest.java  | 114 +++++++++--
 .../provisioning/sling-models-jacksonexporter.txt  |  27 +++
 src/test/provisioning/sling.txt                    |  37 ++++
 6 files changed, 351 insertions(+), 168 deletions(-)

diff --git a/pom.xml b/pom.xml
index 31f270f..440ea4b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>26</version>
+        <version>29</version>
         <relativePath/>
     </parent>
 
@@ -38,73 +38,14 @@
         remote test proxy that runs in the integration-tests phase.
     </description>
     
-    <!-- 
-        To keep the instance under test running and run individual tests
-        against it, use:
-        
-            mvn clean verify -DkeepJarRunning=true -Dhttp.port=8080
-            
-        optionally using jar.executor.vm.options to enable remote debugging,
-        and in another console:
-        
-            mvn -o verify -Dtests.to.run=**/**Test.java -Dtest.server.url=http://localhost:8080
-            
-        optionally using -Dmaven.surefire.debug to enable debugging.            
-     -->
     <properties>
         <sling.java.version>8</sling.java.version>
-        <!-- Set this to run the server on a specific port
-        <http.port></http.port>
-         -->
-         
-        <!-- Set this to run tests against an existing server instance -->
-        <keepJarRunning>false</keepJarRunning>
-        
-        <!-- URL of a server against which to run tests -->
-        <test.server.url />
-        
-         <!-- Set this to run tests against a specific hostname, if test.server.url is not set-->
-         <test.server.hostname />
-
-        <!-- Set this to use a different username for remote execution of sling junit tests -->
-        <test.server.username />
-
-        <!-- Set this to use a different password for remote execution of sling junit tests -->
-        <test.server.password />
-        
-        <!-- Options for the VM that executes our runnable jar -->
-        <jar.executor.vm.options>-Xmx512m</jar.executor.vm.options>
-        <!-- Alternative with JVM debug port
-        <jar.executor.vm.options>-Xmx512m -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=38080,suspend=n</jar.executor.vm.options>
-        -->
-        
-        <!-- Change this to use longer or shorter timeouts for testing -->
-        <sling.testing.timeout.multiplier>1.0</sling.testing.timeout.multiplier>
-        
-        <!-- Set this to run the executable jar in a specified filesystem folder -->
-        <jar.executor.work.folder />
-        
-        <!-- Options for the jar to execute. $JAREXEC_SERVER_PORT$ is replaced by the
-            selected port number -->
-        <jar.executor.jar.options>-p $JAREXEC_SERVER_PORT$</jar.executor.jar.options>
+        <!-- start with -DkeepITServerRunning=true to allow to rerun ITs or inspect the server after the ITs have been executed there -->
+        <keepITServerRunning>false</keepITServerRunning>
     </properties>
 
     <build>
         <plugins>
-           <plugin>
-                <artifactId>maven-clean-plugin</artifactId>
-                <configuration>
-                    <filesets>
-                        <fileset>
-                            <directory>${basedir}</directory>
-                            <includes>
-                                <!-- sling folder is the workdir of the executable jar that we test -->
-                                <include>sling/**</include>
-                            </includes>
-                        </fileset>
-                    </filesets>
-                </configuration>
-            </plugin>
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
@@ -165,117 +106,103 @@
                 </configuration>
             </plugin>
             <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-dependency-plugin</artifactId>
+                <!-- Find free ports to run our server -->
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
                 <executions>
                     <execution>
-                        <id>copy-runnable-jar</id>
+                        <id>reserve-server-port</id>
                         <goals>
-                            <goal>copy-dependencies</goal>
+                            <goal>reserve-network-port</goal>
                         </goals>
-                            <phase>process-resources</phase>
+                        <phase>pre-integration-test</phase>
                         <configuration>
-                            <includeArtifactIds>org.apache.sling.launchpad</includeArtifactIds>
-                            <excludeTransitive>true</excludeTransitive>
-                            <overWriteReleases>false</overWriteReleases>
-                            <overWriteSnapshots>false</overWriteSnapshots>
+                            <portNames>
+                                <!-- reserved port must be stored in property because it must be passed to the slingstart-maven-plugin -->
+                                <portName>http.port</portName>
+                            </portNames>
                         </configuration>
                     </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <!-- the Sling instance is provisioned from the model in src/main/provisioning/model.txt -->
+                <groupId>org.apache.sling</groupId>
+                <artifactId>slingstart-maven-plugin</artifactId>
+                <version>1.9.12</version>
+                <extensions>true</extensions>
+                <executions>
                     <execution>
-                        <!-- 
-                            Consider all dependencies as candidates to be installed
-                            as additional bundles. We use system properties to define
-                            which bundles to install in which order.  
-                        -->
-                        <id>copy-additional-bundles</id>
+                        <id>prepare-launchpad-package</id>
                         <goals>
-                            <goal>copy-dependencies</goal>
+                            <goal>prepare-package</goal>
                         </goals>
-                            <phase>process-resources</phase>
+                        <phase>pre-integration-test</phase>
+                    </execution>
+                    <execution>
+                        <id>build-launchpad-package</id>
+                        <goals>
+                            <goal>package</goal>
+                        </goals>
+                        <phase>pre-integration-test</phase>
                         <configuration>
-                            <outputDirectory>${project.build.directory}</outputDirectory>
-                            <excludeTransitive>true</excludeTransitive>
-                            <overWriteReleases>false</overWriteReleases>
-                            <overWriteSnapshots>false</overWriteSnapshots>
+                            <attachArtifact>false</attachArtifact>
                         </configuration>
                     </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <!-- Find free ports to run our server -->
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>build-helper-maven-plugin</artifactId>
-                <executions>
                     <execution>
-                        <id>reserve-server-port</id>
+                        <id>start-container-before-IT</id>
                         <goals>
-                            <goal>reserve-network-port</goal>
+                            <goal>start</goal>
                         </goals>
-                        <phase>process-resources</phase>
                         <configuration>
-                            <portNames>
-                                <portName>http.port</portName>
-                            </portNames>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>stop-container-after-IT</id>
+                        <goals>
+                            <goal>stop</goal>
+                        </goals>
+                        <configuration>
+                            <shouldBlockUntilKeyIsPressed>${keepITServerRunning}</shouldBlockUntilKeyIsPressed>
                         </configuration>
                     </execution>
                 </executions>
+                <configuration>
+                    <servers>
+                        <!-- this configuration applies to both 'start' and 'stop' -->
+                        <server>
+                            <id>singleinstance</id>
+                            <port>${http.port}</port>
+                            <vmOpts>${sling.vm.options}</vmOpts>
+                            <stdOutFile>sling/logs/stdout.log</stdOutFile>
+                        </server>
+                    </servers>
+                    <!-- this configuration only applies to 'prepare-package' and 'package' -->
+                    <disableExtendingMavenClasspath>true</disableExtendingMavenClasspath>
+                    <usePomDependencies>true</usePomDependencies>
+                </configuration>
             </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-failsafe-plugin</artifactId>
                 <executions>
                     <execution>
-                        <id>integration-test</id>
                         <goals>
                             <goal>integration-test</goal>
-                        </goals>
-                    </execution>
-                    <execution>
-                        <id>verify</id>
-                        <goals>
                             <goal>verify</goal>
                         </goals>
+                        <configuration>
+                            <systemProperties>
+                                <http.port>${http.port}</http.port>
+                            </systemProperties>
+                        </configuration>
                     </execution>
                 </executions>
                 <configuration>
-                    <debugForkedProcess>${maven.surefire.debug}</debugForkedProcess>
                     <systemPropertyVariables>
-                        <test.server.url>${test.server.url}</test.server.url>
-                        <test.server.hostname>${test.server.hostname}</test.server.hostname>
-                        <test.server.username>${test.server.username}</test.server.username>
-                        <test.server.password>${test.server.password}</test.server.password>
-                        <jar.executor.server.port>${http.port}</jar.executor.server.port>
-                        <jar.executor.vm.options>${jar.executor.vm.options}</jar.executor.vm.options>
-                        <jar.executor.jar.folder>${project.basedir}/target/dependency</jar.executor.jar.folder>
-                        <jar.executor.jar.name.regexp>org.apache.sling.launchpad.*jar$</jar.executor.jar.name.regexp>
-                        <jar.executor.work.folder>${jar.executor.work.folder}</jar.executor.work.folder>
-                        <jar.executor.jar.options>${jar.executor.jar.options}</jar.executor.jar.options>
-                        <additional.bundles.path>${project.basedir}/target,${project.basedir}/target/sling/additional-bundles</additional.bundles.path>
-                        <keepJarRunning>${keepJarRunning}</keepJarRunning>
+                        <launchpad.http.server.url>http://localhost:${http.port}</launchpad.http.server.url>
                         <server.ready.timeout.seconds>60</server.ready.timeout.seconds>
-                        <sling.testing.timeout.multiplier>${sling.testing.timeout.multiplier}</sling.testing.timeout.multiplier>
-                        <server.ready.path.1>/:script src="system/sling.js"</server.ready.path.1>
-                        <server.ready.path.2>/.explorer.html:href="/libs/sling/explorer/css/explorer.css"</server.ready.path.2>
-                        <server.ready.path.3>/sling-test/sling/sling-test.html:Sling client library tests</server.ready.path.3>
-                        <start.bundles.timeout.seconds>30</start.bundles.timeout.seconds>
-                        <bundle.install.timeout.seconds>20</bundle.install.timeout.seconds>
-                        
-                        <!-- 
-                            Define additional bundles to install by specifying the beginning of their artifact name.
-                            The bundles are installed in lexical order of these property names.
-                            All bundles must be listed as dependencies in this pom, or they won't be installed. 
-                        -->
-                        <sling.additional.bundle.1>org.apache.sling.junit.core</sling.additional.bundle.1>
-                        <sling.additional.bundle.3>org.apache.sling.commons.johnzon</sling.additional.bundle.3>
-                        <sling.additional.bundle.4>commons-lang3</sling.additional.bundle.4>
-                        <sling.additional.bundle.10>org.apache.sling.models.api</sling.additional.bundle.10>
-                        <sling.additional.bundle.11>org.apache.sling.models.impl</sling.additional.bundle.11>
-                        <sling.additional.bundle.12>org.apache.sling.models.jacksonexporter</sling.additional.bundle.12>
-                        <sling.additional.bundle.13>jackson-annotations</sling.additional.bundle.13>
-                        <sling.additional.bundle.14>jackson-core</sling.additional.bundle.14>
-                        <sling.additional.bundle.15>jackson-databind</sling.additional.bundle.15>
-                        <sling.additional.bundle.16>commons-lang3</sling.additional.bundle.16>
-                        <sling.additional.bundle.17>${project.build.finalName}.jar</sling.additional.bundle.17>
+                        <server.ready.path.1>/starter/index.html:Getting Started</server.ready.path.1>
                     </systemPropertyVariables>
                 </configuration>
             </plugin>
@@ -285,12 +212,12 @@
     <dependencies>
         <dependency>
             <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.core</artifactId>
+            <artifactId>osgi.core</artifactId>
             <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.compendium</artifactId>
+            <artifactId>osgi.cmpn</artifactId>
             <scope>provided</scope>
         </dependency>
         <!-- Additional bundles needed by the Sling instance under test -->
@@ -333,7 +260,7 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.models.impl</artifactId>
-            <version>1.4.11-SNAPSHOT</version>
+            <version>1.4.17-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
@@ -378,7 +305,7 @@
         <!-- actual dependencies -->
         <dependency>
             <groupId>javax.servlet</groupId>
-            <artifactId>servlet-api</artifactId>
+            <artifactId>javax.servlet-api</artifactId>
             <scope>provided</scope>
         </dependency>
         <dependency>
@@ -398,11 +325,6 @@
             <scope>provided</scope>
         </dependency>
         <dependency>
-            <groupId>org.apache.sling</groupId>
-            <artifactId>org.apache.sling.launchpad</artifactId>
-            <version>8</version>
-        </dependency>
-        <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-api</artifactId>
             <version>1.6.6</version>
diff --git a/src/test/java/org/apache/sling/models/testing/helper/FakeRequest.java b/src/test/java/org/apache/sling/models/testing/helper/FakeRequest.java
index 935f706..4e1d969 100644
--- a/src/test/java/org/apache/sling/models/testing/helper/FakeRequest.java
+++ b/src/test/java/org/apache/sling/models/testing/helper/FakeRequest.java
@@ -16,21 +16,32 @@
  */
 package org.apache.sling.models.testing.helper;
 
-import javax.servlet.RequestDispatcher;
-import javax.servlet.ServletInputStream;
-import javax.servlet.http.Cookie;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpSession;
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.UnsupportedEncodingException;
 import java.security.Principal;
+import java.util.Collection;
 import java.util.Collections;
 import java.util.Enumeration;
 import java.util.HashMap;
 import java.util.Locale;
 import java.util.Map;
 
+import javax.servlet.AsyncContext;
+import javax.servlet.DispatcherType;
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.ServletInputStream;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+import javax.servlet.http.HttpUpgradeHandler;
+import javax.servlet.http.Part;
+
 public class FakeRequest implements HttpServletRequest {
 
     private final String path;
@@ -313,4 +324,80 @@ public class FakeRequest implements HttpServletRequest {
     public int getLocalPort() {
         return 0;
     }
+
+    @Override
+    public long getContentLengthLong() {
+        return 0;
+    }
+
+    @Override
+    public ServletContext getServletContext() {
+        return null;
+    }
+
+    @Override
+    public AsyncContext startAsync() throws IllegalStateException {
+        return null;
+    }
+
+    @Override
+    public AsyncContext startAsync(ServletRequest servletRequest, ServletResponse servletResponse)
+            throws IllegalStateException {
+        return null;
+    }
+
+    @Override
+    public boolean isAsyncStarted() {
+        return false;
+    }
+
+    @Override
+    public boolean isAsyncSupported() {
+        return false;
+    }
+
+    @Override
+    public AsyncContext getAsyncContext() {
+        return null;
+    }
+
+    @Override
+    public DispatcherType getDispatcherType() {
+        return null;
+    }
+
+    @Override
+    public String changeSessionId() {
+        return null;
+    }
+
+    @Override
+    public boolean authenticate(HttpServletResponse response) throws IOException, ServletException {
+        return false;
+    }
+
+    @Override
+    public void login(String username, String password) throws ServletException {
+
+    }
+
+    @Override
+    public void logout() throws ServletException {
+
+    }
+
+    @Override
+    public Collection<Part> getParts() throws IOException, ServletException {
+        return null;
+    }
+
+    @Override
+    public Part getPart(String name) throws IOException, ServletException {
+        return null;
+    }
+
+    @Override
+    public <T extends HttpUpgradeHandler> T upgrade(Class<T> handlerClass) throws IOException, ServletException {
+        return null;
+    }
 }
\ No newline at end of file
diff --git a/src/test/java/org/apache/sling/models/testing/helper/FakeResponse.java b/src/test/java/org/apache/sling/models/testing/helper/FakeResponse.java
index 7cf757a..43f8b64 100644
--- a/src/test/java/org/apache/sling/models/testing/helper/FakeResponse.java
+++ b/src/test/java/org/apache/sling/models/testing/helper/FakeResponse.java
@@ -16,14 +16,16 @@
  */
 package org.apache.sling.models.testing.helper;
 
-import javax.servlet.ServletOutputStream;
-import javax.servlet.http.Cookie;
-import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
 import java.io.PrintWriter;
 import java.io.StringWriter;
+import java.util.Collection;
 import java.util.Locale;
 
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletResponse;
+
 public class FakeResponse implements HttpServletResponse {
 
     private StringWriter stringWriter = new StringWriter();
@@ -197,4 +199,24 @@ public class FakeResponse implements HttpServletResponse {
     public int getStatus() {
         return status;
     }
+
+    @Override
+    public void setContentLengthLong(long len) {
+
+    }
+
+    @Override
+    public String getHeader(String name) {
+        return null;
+    }
+
+    @Override
+    public Collection<String> getHeaders(String name) {
+        return null;
+    }
+
+    @Override
+    public Collection<String> getHeaderNames() {
+        return null;
+    }
 }
diff --git a/src/test/java/org/apache/sling/models/testing/rtbound/FakeRequest.java b/src/test/java/org/apache/sling/models/testing/rtbound/FakeRequest.java
index e4f0c04..7171fcb 100644
--- a/src/test/java/org/apache/sling/models/testing/rtbound/FakeRequest.java
+++ b/src/test/java/org/apache/sling/models/testing/rtbound/FakeRequest.java
@@ -16,28 +16,39 @@
  */
 package org.apache.sling.models.testing.rtbound;
 
-import org.apache.sling.api.SlingHttpServletRequest;
-import org.apache.sling.api.request.RequestDispatcherOptions;
-import org.apache.sling.api.request.RequestParameter;
-import org.apache.sling.api.request.RequestParameterMap;
-import org.apache.sling.api.request.RequestPathInfo;
-import org.apache.sling.api.request.RequestProgressTracker;
-import org.apache.sling.api.resource.Resource;
-import org.apache.sling.api.resource.ResourceResolver;
-
-import javax.servlet.RequestDispatcher;
-import javax.servlet.ServletInputStream;
-import javax.servlet.http.Cookie;
-import javax.servlet.http.HttpSession;
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.UnsupportedEncodingException;
 import java.security.Principal;
+import java.util.Collection;
 import java.util.Enumeration;
 import java.util.Locale;
 import java.util.Map;
 import java.util.ResourceBundle;
 
+import javax.servlet.AsyncContext;
+import javax.servlet.DispatcherType;
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.ServletInputStream;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+import javax.servlet.http.HttpUpgradeHandler;
+import javax.servlet.http.Part;
+
+import org.apache.sling.api.SlingHttpServletRequest;
+import org.apache.sling.api.request.RequestDispatcherOptions;
+import org.apache.sling.api.request.RequestParameter;
+import org.apache.sling.api.request.RequestParameterMap;
+import org.apache.sling.api.request.RequestPathInfo;
+import org.apache.sling.api.request.RequestProgressTracker;
+import org.apache.sling.api.resource.Resource;
+import org.apache.sling.api.resource.ResourceResolver;
+
 public class FakeRequest implements SlingHttpServletRequest {
 
     private final Resource resource;
@@ -395,4 +406,81 @@ public class FakeRequest implements SlingHttpServletRequest {
     public <AdapterType> AdapterType adaptTo(Class<AdapterType> aClass) {
         return null;
     }
+
+    @Override
+    public String changeSessionId() {
+        return null;
+    }
+
+    @Override
+    public boolean authenticate(HttpServletResponse response) throws IOException, ServletException {
+        return false;
+    }
+
+    @Override
+    public void login(String username, String password) throws ServletException {
+
+    }
+
+    @Override
+    public void logout() throws ServletException {
+
+    }
+
+    @Override
+    public Collection<Part> getParts() throws IOException, ServletException {
+        return null;
+    }
+
+    @Override
+    public Part getPart(String name) throws IOException, ServletException {
+        return null;
+    }
+
+    @Override
+    public <T extends HttpUpgradeHandler> T upgrade(Class<T> handlerClass) throws IOException, ServletException {
+        return null;
+    }
+
+    @Override
+    public long getContentLengthLong() {
+        return 0;
+    }
+
+    @Override
+    public ServletContext getServletContext() {
+        return null;
+    }
+
+    @Override
+    public AsyncContext startAsync() throws IllegalStateException {
+        return null;
+    }
+
+    @Override
+    public AsyncContext startAsync(ServletRequest servletRequest, ServletResponse servletResponse)
+            throws IllegalStateException {
+        return null;
+    }
+
+    @Override
+    public boolean isAsyncStarted() {
+        return false;
+    }
+
+    @Override
+    public boolean isAsyncSupported() {
+        return false;
+    }
+
+    @Override
+    public AsyncContext getAsyncContext() {
+        return null;
+    }
+
+    @Override
+    public DispatcherType getDispatcherType() {
+        return null;
+    }
+
 }
diff --git a/src/test/provisioning/sling-models-jacksonexporter.txt b/src/test/provisioning/sling-models-jacksonexporter.txt
new file mode 100644
index 0000000..6ee60ba
--- /dev/null
+++ b/src/test/provisioning/sling-models-jacksonexporter.txt
@@ -0,0 +1,27 @@
+#
+#  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.
+#
+[feature name=models-jacksonexporter]
+[variables]
+    jackson.version=2.9.7
+
+[artifacts]
+  org.apache.sling/org.apache.sling.models.jacksonexporter
+  com.fasterxml.jackson.core/jackson-annotations/${jackson.version}
+  com.fasterxml.jackson.core/jackson-core/${jackson.version}
+  com.fasterxml.jackson.core/jackson-databind/${jackson.version}
diff --git a/src/test/provisioning/sling.txt b/src/test/provisioning/sling.txt
new file mode 100644
index 0000000..fef1bba
--- /dev/null
+++ b/src/test/provisioning/sling.txt
@@ -0,0 +1,37 @@
+#
+#  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.
+#
+
+# must be the same feature name as the feature defined in slingstart to allow merging
+[feature name=sling]
+
+[artifacts]
+    org.apache.sling/org.apache.sling.starter/11/slingstart
+
+    # Use versions as defined in POM
+    org.apache.sling/org.apache.sling.models.api
+    org.apache.sling/org.apache.sling.models.impl
+
+    # Additional test bundles
+    org.apache.sling/org.apache.sling.junit.core
+    org.apache.sling/org.apache.sling.models.integration-tests
+
+[configurations]
+    # Allow login administrative for org.apache.sling.junit.core
+    org.apache.sling.jcr.base.internal.LoginAdminWhitelist
+        whitelist.bundles.regexp="org\.apache\.sling\.junit\.core"

[sling-org-apache-sling-models-integration-tests] 01/05: update to java 8

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

sseifert pushed a commit to branch feature/SLING-10948-update-integration-tests
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-models-integration-tests.git

commit a3e26e5f91f38171692e590608e231ef8e9281b8
Author: Stefan Seifert <st...@users.noreply.github.com>
AuthorDate: Wed Dec 1 15:28:15 2021 +0100

    update to java 8
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index e36f4cf..31f270f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -52,7 +52,7 @@
         optionally using -Dmaven.surefire.debug to enable debugging.            
      -->
     <properties>
-        <sling.java.version>7</sling.java.version>
+        <sling.java.version>8</sling.java.version>
         <!-- Set this to run the server on a specific port
         <http.port></http.port>
          -->

[sling-org-apache-sling-models-integration-tests] 05/05: organize imports

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

sseifert pushed a commit to branch feature/SLING-10948-update-integration-tests
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-models-integration-tests.git

commit 81d8047eb0fec2b3e3e02e33112997b99a8d26a8
Author: Stefan Seifert <st...@users.noreply.github.com>
AuthorDate: Wed Dec 1 17:50:34 2021 +0100

    organize imports
---
 .../sling/models/it/delegate/request/DelegateBaseModel.java  |  4 ++--
 .../sling/models/it/delegate/resource/DelegateBaseModel.java |  4 ++--
 .../org/apache/sling/models/it/exporter/BaseComponent.java   |  1 -
 .../sling/models/it/exporter/BaseRequestComponent.java       | 12 +++++++-----
 .../org/apache/sling/models/it/exporter/ComponentImpl.java   |  4 ++--
 .../sling/models/it/exporter/DoubledFirstComponent.java      |  4 ----
 .../apache/sling/models/it/exporter/ExtendedComponent.java   |  4 ++--
 .../sling/models/it/exporter/ExtendedRequestComponent.java   | 12 ++++++------
 .../sling/models/it/exporter/RequestComponentImpl.java       |  4 ++--
 .../apache/sling/models/it/models/RequestSelfModelImpl.java  |  1 -
 .../it/services/AnotherTestBindingsValuesProvider.java       |  8 ++++----
 .../sling/models/it/services/TestBindingsValuesProvider.java |  8 ++++----
 .../sling/models/it/services/TestResourceDecorator.java      |  4 ++--
 .../apache/sling/models/it/servlets/PathBoundServlet.java    |  7 ++++---
 .../teleporter/customizers/SM_TeleporterCustomizer.java      |  2 --
 .../java/org/apache/sling/models/testing/DecoratedIT.java    | 11 ++++++-----
 .../sling/models/testing/InjectorSpecificAnnotationIT.java   |  1 -
 src/test/java/org/apache/sling/models/testing/SimpleIT.java  |  6 ++++--
 src/test/java/org/apache/sling/models/testing/ViaIT.java     |  3 ++-
 .../sling/models/testing/delegate/DelegateRequestIT.java     | 12 +++++++-----
 .../sling/models/testing/delegate/DelegateResourceIT.java    | 12 +++++++-----
 .../org/apache/sling/models/testing/exporter/ExporterIT.java |  2 +-
 .../models/testing/rtboundpicker/ResourceTypePickerIT.java   |  6 +++---
 23 files changed, 67 insertions(+), 65 deletions(-)

diff --git a/src/main/java/org/apache/sling/models/it/delegate/request/DelegateBaseModel.java b/src/main/java/org/apache/sling/models/it/delegate/request/DelegateBaseModel.java
index e958123..db9f00f 100644
--- a/src/main/java/org/apache/sling/models/it/delegate/request/DelegateBaseModel.java
+++ b/src/main/java/org/apache/sling/models/it/delegate/request/DelegateBaseModel.java
@@ -16,12 +16,12 @@
  */
 package org.apache.sling.models.it.delegate.request;
 
+import javax.inject.Inject;
+
 import org.apache.sling.api.SlingHttpServletRequest;
 import org.apache.sling.models.annotations.Model;
 import org.apache.sling.models.annotations.Via;
 
-import javax.inject.Inject;
-
 @Model(adaptables = SlingHttpServletRequest.class, adapters = DelegateInterface.class,
     resourceType = "sling/delegate/base")
 public class DelegateBaseModel implements DelegateInterface {
diff --git a/src/main/java/org/apache/sling/models/it/delegate/resource/DelegateBaseModel.java b/src/main/java/org/apache/sling/models/it/delegate/resource/DelegateBaseModel.java
index d58cf87..476fce6 100644
--- a/src/main/java/org/apache/sling/models/it/delegate/resource/DelegateBaseModel.java
+++ b/src/main/java/org/apache/sling/models/it/delegate/resource/DelegateBaseModel.java
@@ -16,11 +16,11 @@
  */
 package org.apache.sling.models.it.delegate.resource;
 
+import javax.inject.Inject;
+
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.models.annotations.Model;
 
-import javax.inject.Inject;
-
 @Model(adaptables = Resource.class, adapters = DelegateInterface.class,
     resourceType = "sling/delegate/base")
 public class DelegateBaseModel implements DelegateInterface {
diff --git a/src/main/java/org/apache/sling/models/it/exporter/BaseComponent.java b/src/main/java/org/apache/sling/models/it/exporter/BaseComponent.java
index 26a303b..5412d52 100644
--- a/src/main/java/org/apache/sling/models/it/exporter/BaseComponent.java
+++ b/src/main/java/org/apache/sling/models/it/exporter/BaseComponent.java
@@ -20,7 +20,6 @@ import javax.inject.Inject;
 
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.models.annotations.Exporter;
-import org.apache.sling.models.annotations.ExporterOption;
 import org.apache.sling.models.annotations.Model;
 
 import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/src/main/java/org/apache/sling/models/it/exporter/BaseRequestComponent.java b/src/main/java/org/apache/sling/models/it/exporter/BaseRequestComponent.java
index 4765b80..95f0547 100644
--- a/src/main/java/org/apache/sling/models/it/exporter/BaseRequestComponent.java
+++ b/src/main/java/org/apache/sling/models/it/exporter/BaseRequestComponent.java
@@ -16,7 +16,12 @@
  */
 package org.apache.sling.models.it.exporter;
 
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+import javax.inject.Inject;
+import javax.servlet.ServletRequest;
+import javax.servlet.http.HttpServletRequest;
+
 import org.apache.sling.api.SlingHttpServletRequest;
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.models.annotations.Exporter;
@@ -25,10 +30,7 @@ import org.apache.sling.models.annotations.Model;
 import org.apache.sling.models.annotations.Via;
 import org.apache.sling.models.annotations.injectorspecific.SlingObject;
 
-import javax.inject.Inject;
-import javax.servlet.ServletRequest;
-import javax.servlet.http.HttpServletRequest;
-import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonProperty;
 
 @Model(adaptables = { SlingHttpServletRequest.class }, resourceType = "sling/exp-request/base")
 @Exporter(name = "jackson", extensions = "json", options = {
diff --git a/src/main/java/org/apache/sling/models/it/exporter/ComponentImpl.java b/src/main/java/org/apache/sling/models/it/exporter/ComponentImpl.java
index b5839b8..752efc1 100644
--- a/src/main/java/org/apache/sling/models/it/exporter/ComponentImpl.java
+++ b/src/main/java/org/apache/sling/models/it/exporter/ComponentImpl.java
@@ -16,12 +16,12 @@
  */
 package org.apache.sling.models.it.exporter;
 
+import javax.inject.Inject;
+
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.models.annotations.Exporter;
 import org.apache.sling.models.annotations.Model;
 
-import javax.inject.Inject;
-
 @Model(adaptables = { Resource.class }, adapters = Component.class, resourceType = "sling/exp/interface")
 @Exporter(name = "jackson", extensions = "json")
 public class ComponentImpl implements Component {
diff --git a/src/main/java/org/apache/sling/models/it/exporter/DoubledFirstComponent.java b/src/main/java/org/apache/sling/models/it/exporter/DoubledFirstComponent.java
index e7cb909..6a138cc 100644
--- a/src/main/java/org/apache/sling/models/it/exporter/DoubledFirstComponent.java
+++ b/src/main/java/org/apache/sling/models/it/exporter/DoubledFirstComponent.java
@@ -16,14 +16,10 @@
  */
 package org.apache.sling.models.it.exporter;
 
-import com.fasterxml.jackson.annotation.JsonProperty;
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.models.annotations.Exporter;
 import org.apache.sling.models.annotations.Model;
 
-import javax.inject.Inject;
-import javax.inject.Named;
-
 @Model(adaptables = { Resource.class }, resourceType = "sling/exp/doubled")
 @Exporter(name = "jackson", extensions = "json", selector = "firstmodel")
 public class DoubledFirstComponent {
diff --git a/src/main/java/org/apache/sling/models/it/exporter/ExtendedComponent.java b/src/main/java/org/apache/sling/models/it/exporter/ExtendedComponent.java
index 033a6f6..eb94e7f 100644
--- a/src/main/java/org/apache/sling/models/it/exporter/ExtendedComponent.java
+++ b/src/main/java/org/apache/sling/models/it/exporter/ExtendedComponent.java
@@ -20,12 +20,12 @@ import java.util.Calendar;
 import java.util.Date;
 import java.util.GregorianCalendar;
 
+import javax.inject.Inject;
+
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.models.annotations.Exporter;
 import org.apache.sling.models.annotations.Model;
 
-import javax.inject.Inject;
-
 @Model(adaptables = { Resource.class }, resourceType = "sling/exp/extended")
 @Exporter(name = "jackson", extensions = "json")
 public class ExtendedComponent extends BaseComponent {
diff --git a/src/main/java/org/apache/sling/models/it/exporter/ExtendedRequestComponent.java b/src/main/java/org/apache/sling/models/it/exporter/ExtendedRequestComponent.java
index 6231d68..4072497 100644
--- a/src/main/java/org/apache/sling/models/it/exporter/ExtendedRequestComponent.java
+++ b/src/main/java/org/apache/sling/models/it/exporter/ExtendedRequestComponent.java
@@ -16,18 +16,18 @@
  */
 package org.apache.sling.models.it.exporter;
 
+import java.util.Calendar;
+import java.util.Date;
+import java.util.GregorianCalendar;
+
+import javax.inject.Inject;
+
 import org.apache.sling.api.SlingHttpServletRequest;
-import org.apache.sling.api.resource.Resource;
 import org.apache.sling.models.annotations.Exporter;
 import org.apache.sling.models.annotations.ExporterOption;
 import org.apache.sling.models.annotations.Model;
 import org.apache.sling.models.annotations.Via;
 
-import javax.inject.Inject;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.GregorianCalendar;
-
 @Model(adaptables = { SlingHttpServletRequest.class }, resourceType = "sling/exp-request/extended")
 @Exporter(name = "jackson", extensions = "json", options = {
     @ExporterOption(name = "SerializationFeature.WRITE_DATES_AS_TIMESTAMPS", value = "false")
diff --git a/src/main/java/org/apache/sling/models/it/exporter/RequestComponentImpl.java b/src/main/java/org/apache/sling/models/it/exporter/RequestComponentImpl.java
index 7872b75..34c8c49 100644
--- a/src/main/java/org/apache/sling/models/it/exporter/RequestComponentImpl.java
+++ b/src/main/java/org/apache/sling/models/it/exporter/RequestComponentImpl.java
@@ -16,6 +16,8 @@
  */
 package org.apache.sling.models.it.exporter;
 
+import javax.inject.Inject;
+
 import org.apache.sling.api.SlingHttpServletRequest;
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.models.annotations.Exporter;
@@ -23,8 +25,6 @@ import org.apache.sling.models.annotations.Model;
 import org.apache.sling.models.annotations.Via;
 import org.apache.sling.models.annotations.injectorspecific.SlingObject;
 
-import javax.inject.Inject;
-
 @Model(adaptables = { SlingHttpServletRequest.class }, adapters = Component.class, resourceType = "sling/exp-request/interface")
 @Exporter(name = "jackson", extensions = "json")
 public class RequestComponentImpl implements Component {
diff --git a/src/main/java/org/apache/sling/models/it/models/RequestSelfModelImpl.java b/src/main/java/org/apache/sling/models/it/models/RequestSelfModelImpl.java
index f8ccb2d..5c6bf58 100644
--- a/src/main/java/org/apache/sling/models/it/models/RequestSelfModelImpl.java
+++ b/src/main/java/org/apache/sling/models/it/models/RequestSelfModelImpl.java
@@ -17,7 +17,6 @@
 package org.apache.sling.models.it.models;
 
 import org.apache.sling.api.SlingHttpServletRequest;
-import org.apache.sling.api.resource.Resource;
 import org.apache.sling.models.annotations.Model;
 import org.apache.sling.models.annotations.injectorspecific.Self;
 
diff --git a/src/main/java/org/apache/sling/models/it/services/AnotherTestBindingsValuesProvider.java b/src/main/java/org/apache/sling/models/it/services/AnotherTestBindingsValuesProvider.java
index ee77a9c..e7daa63 100644
--- a/src/main/java/org/apache/sling/models/it/services/AnotherTestBindingsValuesProvider.java
+++ b/src/main/java/org/apache/sling/models/it/services/AnotherTestBindingsValuesProvider.java
@@ -16,14 +16,14 @@
  */
 package org.apache.sling.models.it.services;
 
-import org.apache.felix.scr.annotations.Component;
-import org.apache.felix.scr.annotations.Property;
-import org.apache.felix.scr.annotations.Service;
-
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Property;
+import org.apache.felix.scr.annotations.Service;
+
 @Component
 @Service(value = Map.class)
 @Property(name = "javax.script.name", value = "sling-models-exporter")
diff --git a/src/main/java/org/apache/sling/models/it/services/TestBindingsValuesProvider.java b/src/main/java/org/apache/sling/models/it/services/TestBindingsValuesProvider.java
index 40ee96a..a9e1923 100644
--- a/src/main/java/org/apache/sling/models/it/services/TestBindingsValuesProvider.java
+++ b/src/main/java/org/apache/sling/models/it/services/TestBindingsValuesProvider.java
@@ -16,14 +16,14 @@
  */
 package org.apache.sling.models.it.services;
 
-import org.apache.felix.scr.annotations.Component;
-import org.apache.felix.scr.annotations.Property;
-import org.apache.felix.scr.annotations.Service;
-
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Property;
+import org.apache.felix.scr.annotations.Service;
+
 @Component
 @Service(value = Map.class)
 @Property(name = "javax.script.name", value = "*")
diff --git a/src/main/java/org/apache/sling/models/it/services/TestResourceDecorator.java b/src/main/java/org/apache/sling/models/it/services/TestResourceDecorator.java
index 503ca5b..fd9f96f 100644
--- a/src/main/java/org/apache/sling/models/it/services/TestResourceDecorator.java
+++ b/src/main/java/org/apache/sling/models/it/services/TestResourceDecorator.java
@@ -16,6 +16,8 @@
  */
 package org.apache.sling.models.it.services;
 
+import javax.servlet.http.HttpServletRequest;
+
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Reference;
 import org.apache.felix.scr.annotations.Service;
@@ -25,8 +27,6 @@ import org.apache.sling.api.resource.ResourceDecorator;
 import org.apache.sling.api.resource.ResourceWrapper;
 import org.apache.sling.api.resource.ValueMap;
 
-import javax.servlet.http.HttpServletRequest;
-
 @Component
 @Service
 public class TestResourceDecorator implements ResourceDecorator {
diff --git a/src/main/java/org/apache/sling/models/it/servlets/PathBoundServlet.java b/src/main/java/org/apache/sling/models/it/servlets/PathBoundServlet.java
index 170d7f3..6385792 100644
--- a/src/main/java/org/apache/sling/models/it/servlets/PathBoundServlet.java
+++ b/src/main/java/org/apache/sling/models/it/servlets/PathBoundServlet.java
@@ -16,15 +16,16 @@
  */
 package org.apache.sling.models.it.servlets;
 
+import java.io.IOException;
+
+import javax.servlet.ServletException;
+
 import org.apache.felix.scr.annotations.sling.SlingServlet;
 import org.apache.sling.api.SlingHttpServletRequest;
 import org.apache.sling.api.SlingHttpServletResponse;
 import org.apache.sling.api.servlets.SlingSafeMethodsServlet;
 import org.apache.sling.models.it.models.RequestSelfModel;
 
-import javax.servlet.ServletException;
-import java.io.IOException;
-
 @SlingServlet(paths = "/apps/rtpickerrequest")
 public class PathBoundServlet extends SlingSafeMethodsServlet {
 
diff --git a/src/test/java/org/apache/sling/junit/teleporter/customizers/SM_TeleporterCustomizer.java b/src/test/java/org/apache/sling/junit/teleporter/customizers/SM_TeleporterCustomizer.java
index 908be63..0af6245 100644
--- a/src/test/java/org/apache/sling/junit/teleporter/customizers/SM_TeleporterCustomizer.java
+++ b/src/test/java/org/apache/sling/junit/teleporter/customizers/SM_TeleporterCustomizer.java
@@ -21,8 +21,6 @@ import org.apache.sling.testing.clients.util.TimeoutsProvider;
 import org.apache.sling.testing.serversetup.instance.SlingTestBase;
 import org.apache.sling.testing.teleporter.client.ClientSideTeleporter;
 
-import java.io.File;
-
 /** This is required by the TeleporterRule, to setup the client-side
  *  teleporter with (at least) the test server URL.
  */
diff --git a/src/test/java/org/apache/sling/models/testing/DecoratedIT.java b/src/test/java/org/apache/sling/models/testing/DecoratedIT.java
index 54ee904..7a3c73b 100644
--- a/src/test/java/org/apache/sling/models/testing/DecoratedIT.java
+++ b/src/test/java/org/apache/sling/models/testing/DecoratedIT.java
@@ -16,6 +16,12 @@
  */
 package org.apache.sling.models.testing;
 
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import javax.jcr.Node;
+import javax.jcr.Session;
+
 import org.apache.commons.lang.RandomStringUtils;
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.api.resource.ResourceResolver;
@@ -29,11 +35,6 @@ import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 
-import javax.jcr.Node;
-import javax.jcr.Session;
-
-import static org.junit.Assert.*;
-
 public class DecoratedIT {
 
     @Rule
diff --git a/src/test/java/org/apache/sling/models/testing/InjectorSpecificAnnotationIT.java b/src/test/java/org/apache/sling/models/testing/InjectorSpecificAnnotationIT.java
index 7376b81..01a1faf 100644
--- a/src/test/java/org/apache/sling/models/testing/InjectorSpecificAnnotationIT.java
+++ b/src/test/java/org/apache/sling/models/testing/InjectorSpecificAnnotationIT.java
@@ -30,7 +30,6 @@ import org.apache.sling.junit.rules.TeleporterRule;
 import org.apache.sling.models.it.models.SlingPropertyAnnotationTestModel;
 import org.junit.Rule;
 import org.junit.Test;
-import org.junit.runner.RunWith;
 
 public class InjectorSpecificAnnotationIT {
 
diff --git a/src/test/java/org/apache/sling/models/testing/SimpleIT.java b/src/test/java/org/apache/sling/models/testing/SimpleIT.java
index ee8030f..d53e777 100644
--- a/src/test/java/org/apache/sling/models/testing/SimpleIT.java
+++ b/src/test/java/org/apache/sling/models/testing/SimpleIT.java
@@ -16,7 +16,9 @@
  */
 package org.apache.sling.models.testing;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertSame;
 
 import javax.jcr.Node;
 import javax.jcr.Session;
@@ -27,8 +29,8 @@ import org.apache.sling.api.resource.ResourceResolver;
 import org.apache.sling.api.resource.ResourceResolverFactory;
 import org.apache.sling.junit.rules.TeleporterRule;
 import org.apache.sling.models.it.models.ConstructorInjectionTestModel;
-import org.apache.sling.models.it.models.InterfaceInjectionTestModel;
 import org.apache.sling.models.it.models.FieldInjectionTestModel;
+import org.apache.sling.models.it.models.InterfaceInjectionTestModel;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Rule;
diff --git a/src/test/java/org/apache/sling/models/testing/ViaIT.java b/src/test/java/org/apache/sling/models/testing/ViaIT.java
index b450154..6ac7f4c 100644
--- a/src/test/java/org/apache/sling/models/testing/ViaIT.java
+++ b/src/test/java/org/apache/sling/models/testing/ViaIT.java
@@ -16,7 +16,8 @@
  */
 package org.apache.sling.models.testing;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
 
 import javax.jcr.Node;
 import javax.jcr.Session;
diff --git a/src/test/java/org/apache/sling/models/testing/delegate/DelegateRequestIT.java b/src/test/java/org/apache/sling/models/testing/delegate/DelegateRequestIT.java
index 1f4e04a..0cb831f 100644
--- a/src/test/java/org/apache/sling/models/testing/delegate/DelegateRequestIT.java
+++ b/src/test/java/org/apache/sling/models/testing/delegate/DelegateRequestIT.java
@@ -16,6 +16,13 @@
  */
 package org.apache.sling.models.testing.delegate;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.HashMap;
+import java.util.Map;
+
 import org.apache.sling.api.SlingConstants;
 import org.apache.sling.api.resource.LoginException;
 import org.apache.sling.api.resource.PersistenceException;
@@ -33,11 +40,6 @@ import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 
-import java.util.HashMap;
-import java.util.Map;
-
-import static org.junit.Assert.*;
-
 public class DelegateRequestIT {
 
     @Rule
diff --git a/src/test/java/org/apache/sling/models/testing/delegate/DelegateResourceIT.java b/src/test/java/org/apache/sling/models/testing/delegate/DelegateResourceIT.java
index 044d98a..60b7e2d 100644
--- a/src/test/java/org/apache/sling/models/testing/delegate/DelegateResourceIT.java
+++ b/src/test/java/org/apache/sling/models/testing/delegate/DelegateResourceIT.java
@@ -16,6 +16,13 @@
  */
 package org.apache.sling.models.testing.delegate;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.HashMap;
+import java.util.Map;
+
 import org.apache.sling.api.SlingConstants;
 import org.apache.sling.api.resource.LoginException;
 import org.apache.sling.api.resource.PersistenceException;
@@ -31,11 +38,6 @@ import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 
-import java.util.HashMap;
-import java.util.Map;
-
-import static org.junit.Assert.*;
-
 public class DelegateResourceIT {
 
     @Rule
diff --git a/src/test/java/org/apache/sling/models/testing/exporter/ExporterIT.java b/src/test/java/org/apache/sling/models/testing/exporter/ExporterIT.java
index 5221f31..9ac12db 100644
--- a/src/test/java/org/apache/sling/models/testing/exporter/ExporterIT.java
+++ b/src/test/java/org/apache/sling/models/testing/exporter/ExporterIT.java
@@ -16,9 +16,9 @@
  */
 package org.apache.sling.models.testing.exporter;
 
+import java.io.ByteArrayInputStream;
 import java.io.InputStream;
 import java.io.StringReader;
-import java.io.ByteArrayInputStream;
 import java.text.Format;
 import java.util.Calendar;
 import java.util.Collections;
diff --git a/src/test/java/org/apache/sling/models/testing/rtboundpicker/ResourceTypePickerIT.java b/src/test/java/org/apache/sling/models/testing/rtboundpicker/ResourceTypePickerIT.java
index 3230d37..d6223ae 100644
--- a/src/test/java/org/apache/sling/models/testing/rtboundpicker/ResourceTypePickerIT.java
+++ b/src/test/java/org/apache/sling/models/testing/rtboundpicker/ResourceTypePickerIT.java
@@ -16,6 +16,9 @@
  */
 package org.apache.sling.models.testing.rtboundpicker;
 
+import java.util.HashMap;
+import java.util.Map;
+
 import org.apache.sling.api.SlingConstants;
 import org.apache.sling.api.resource.LoginException;
 import org.apache.sling.api.resource.PersistenceException;
@@ -32,9 +35,6 @@ import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 
-import java.util.HashMap;
-import java.util.Map;
-
 public class ResourceTypePickerIT {
 
     @Rule

[sling-org-apache-sling-models-integration-tests] 04/05: update dependencies

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

sseifert pushed a commit to branch feature/SLING-10948-update-integration-tests
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-models-integration-tests.git

commit 461ca6dd9369ad39b378cb494ff7cda9324af46f
Author: Stefan Seifert <st...@users.noreply.github.com>
AuthorDate: Wed Dec 1 17:47:36 2021 +0100

    update dependencies
---
 pom.xml                                            | 30 +++++++++++-----------
 .../sling/models/testing/rtbound/FakeRequest.java  |  6 +++++
 2 files changed, 21 insertions(+), 15 deletions(-)

diff --git a/pom.xml b/pom.xml
index a29a100..f849276 100644
--- a/pom.xml
+++ b/pom.xml
@@ -225,25 +225,25 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.junit.core</artifactId>
-            <version>1.0.26</version>
+            <version>1.0.28</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.testing.rules</artifactId>
-            <version>1.0.1</version>
+            <version>1.0.8</version>
             <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.junit.teleporter</artifactId>
-            <version>1.0.12</version>
+            <version>1.0.20</version>
             <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.engine</artifactId>
-            <version>2.2.0</version>
+            <version>2.6.14</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
@@ -279,19 +279,19 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.api</artifactId>
-            <version>2.4.0</version>
+            <version>2.18.4</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>commons-lang</groupId>
             <artifactId>commons-lang</artifactId>
-            <version>2.5</version>
+            <version>2.6</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>com.fasterxml.jackson.core</groupId>
             <artifactId>jackson-annotations</artifactId>
-            <version>2.3.2</version>
+            <version>2.9.7</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
@@ -301,15 +301,21 @@
             <scope>provided</scope>
         </dependency>
         <dependency>
+            <groupId>commons-beanutils</groupId>
+            <artifactId>commons-beanutils</artifactId>
+            <version>1.9.2</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-api</artifactId>
-            <version>1.6.6</version>
+            <version>1.7.25</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-simple</artifactId>
-            <version>1.6.6</version>
+            <version>1.7.25</version>
             <scope>test</scope>
         </dependency>
         <dependency>
@@ -317,12 +323,6 @@
             <artifactId>junit</artifactId>
             <scope>test</scope>
         </dependency>
-        <dependency>
-            <groupId>commons-beanutils</groupId>
-            <artifactId>commons-beanutils</artifactId>
-            <version>1.9.2</version>
-            <scope>provided</scope>
-        </dependency>
     </dependencies>
 
     <profiles>
diff --git a/src/test/java/org/apache/sling/models/testing/rtbound/FakeRequest.java b/src/test/java/org/apache/sling/models/testing/rtbound/FakeRequest.java
index 7171fcb..6548ac9 100644
--- a/src/test/java/org/apache/sling/models/testing/rtbound/FakeRequest.java
+++ b/src/test/java/org/apache/sling/models/testing/rtbound/FakeRequest.java
@@ -22,6 +22,7 @@ import java.io.UnsupportedEncodingException;
 import java.security.Principal;
 import java.util.Collection;
 import java.util.Enumeration;
+import java.util.List;
 import java.util.Locale;
 import java.util.Map;
 import java.util.ResourceBundle;
@@ -483,4 +484,9 @@ public class FakeRequest implements SlingHttpServletRequest {
         return null;
     }
 
+    @Override
+    public List<RequestParameter> getRequestParameterList() {
+        return null;
+    }
+
 }