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/10/23 09:27:43 UTC

[sling-org-apache-sling-scripting-sightly-testing] branch master updated (939e90d -> 919e342)

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

rombert pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-sightly-testing.git.


    from 939e90d  Fix typo in pom.xml : conncetion should be connection
     new 9ba9c98  Revert "Fix typo in pom.xml : conncetion should be connection"
     new 2b4860e  Revert "Fix typo in pom.xml : conncetion should be connection"
     new 919e342  Fix typo in pom.xml : conncetion should be connection

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


Summary of changes:
 .gitignore                                         |  16 +-
 README.md                                          |   9 +-
 pom.xml                                            | 548 +++------------------
 src/main/provisioning/model.txt                    |  40 +-
 src/test/java/LaunchpadReadyIT.java                |  37 ++
 .../sightly/it/SlingSpecificsSightlyIT.java        | 392 +++++++++++++++
 .../sightly/it/performance/PerformanceIT.java      | 124 +++++
 src/test/resources/RepoPojo.java.original          |  23 +
 src/test/resources/RepoPojo.java.updated           |  23 +
 src/test/resources/logback-test.xml                |   2 +-
 src/test/resources/update.html                     |  17 +
 src/test/resources/update.v2.html                  |  17 +
 12 files changed, 747 insertions(+), 501 deletions(-)
 create mode 100644 src/test/java/LaunchpadReadyIT.java
 create mode 100644 src/test/java/org/apache/sling/scripting/sightly/it/SlingSpecificsSightlyIT.java
 create mode 100644 src/test/java/org/apache/sling/scripting/sightly/it/performance/PerformanceIT.java
 create mode 100644 src/test/resources/RepoPojo.java.original
 create mode 100644 src/test/resources/RepoPojo.java.updated
 create mode 100644 src/test/resources/update.html
 create mode 100644 src/test/resources/update.v2.html

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

[sling-org-apache-sling-scripting-sightly-testing] 02/03: Revert "Fix typo in pom.xml : conncetion should be connection"

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

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-sightly-testing.git

commit 2b4860e24feb5d30520501c63e1334eab6853fae
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Mon Oct 23 12:27:08 2017 +0300

    Revert "Fix typo in pom.xml : conncetion should be connection"
    
    This reverts commit 939e90de222c2272866887244856e5702e5b875e.
---
 .gitignore                          |  16 +-
 README.md                           |   9 +-
 pom.xml                             | 548 +++++-------------------------------
 src/main/provisioning/model.txt     |  40 ++-
 src/test/resources/logback-test.xml |   2 +-
 5 files changed, 114 insertions(+), 501 deletions(-)

diff --git a/.gitignore b/.gitignore
index 3a86d90..7f65232 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,15 @@
-/sling/
+atlassian-ide-plugin.xml
+target
+.idea
+.classpath
+.project
+.settings
+.checkstyle
+*.iml
+*.ipr
+*.iws
+bin
+.vlt
+.vlt-sync-config.properties
+.vlt-sync.log
+.DS_Store
diff --git a/README.md b/README.md
index 5f9646a..c107c02 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,8 @@
-# Apache Sling Scripting HTL Integration Tests
+Sling Jenkins jobs creation
+---------------------------
 
-This module is part of the [Apache Sling](https://sling.apache.org) project.
+The scripts found in this folder are used to create the Jenkins jobs
+listed at https://builds.apache.org/view/S-Z/view/Sling/
+
+See https://cwiki.apache.org/confluence/display/SLING/Sling+Jenkins+Setup
+for more info.
diff --git a/pom.xml b/pom.xml
index a4f1759..3dc07a9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,504 +1,102 @@
-<?xml version="1.0"?>
-<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-  ~ 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.
-  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+<!--
+  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>30</version>
+        <artifactId>sling-archetype-parent</artifactId>
+        <version>1</version>
         <relativePath/>
     </parent>
+    <groupId>org.apache.sling</groupId>
+    <artifactId>sling-taglib-archetype</artifactId>
+    <packaging>maven-archetype</packaging>
+    <version>1.0.0-SNAPSHOT</version>
 
-    <artifactId>org.apache.sling.scripting.sightly.testing</artifactId>
-    <packaging>slingstart</packaging>
-    <version>1.0.5-SNAPSHOT</version>
-
-    <name>Apache Sling Scripting HTL Integration Tests</name>
-    <description>This project runs the integration tests for validating the Apache Sling Scripting HTL implementation
-        against the Adobe HTL TCK.
-    </description>
+    <name>Apache Sling Taglib Archetype</name>
+    <description>Maven archetype for JSP Taglib</description>
 
     <scm>
-        <connection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-sightly-testing.git</connection>
-        <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-sightly-testing.git</developerConnection>
-        <url>https://gitbox.apache.org/repos/asf?p=sling-org-apache-sling-scripting-sightly-testing.git</url>
+        <connection>scm:git:https://gitbox.apache.org/repos/asf/sling-taglib-archetype.git</conncetion>
+        <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/sling-taglib-archetype.git</developerConnection>
+        <url>https://gitbox.apache.org/repos/asf?p=sling-taglib-archetype.git</url>
     </scm>
-
-    <properties>
-        <!-- run modes for integration tests -->
-        <sling.run.modes>oak_tar</sling.run.modes>
-
-        <!-- path suffix for HTTP access to Sling -->
-        <http.base.path/>
-
-        <!-- hostname for integration tests -->
-        <test.host>localhost</test.host>
-
-        <!-- optionally exclude some integration tests  -->
-        <failsafe.exclude/>
-
-        <!--
-            Set this to true to stop mvn once the integration test Jetty instance is
-            started. Useful to manually test the integration testing webapp.
-        -->
-        <integration.test.wait>false</integration.test.wait>
-
-        <!--
-        if set to "true" this will start the launchpad with the following debug options:
-            -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000
-
-        otherwise you can provide your own debug settings
-        -->
-        <debug.options/>
-
-        <jacoco.maven.plugin.version>0.7.9</jacoco.maven.plugin.version>
-        <!-- HTL modules under test versions -->
-        <org.apache.sling.scripting.sightly.compiler.version>1.0.15-SNAPSHOT</org.apache.sling.scripting.sightly.compiler.version>
-        <org.apache.sling.scripting.sightly.compiler.java.version>1.0.15-SNAPSHOT</org.apache.sling.scripting.sightly.compiler.java.version>
-        <org.apache.sling.scripting.sightly.version>1.0.43-SNAPSHOT</org.apache.sling.scripting.sightly.version>
-        <org.apache.sling.scripting.sightly.js.provider.version>1.0.25-SNAPSHOT</org.apache.sling.scripting.sightly.js.provider.version>
-        <org.apache.sling.scripting.sightly.models.provider.version>1.0.7-SNAPSHOT</org.apache.sling.scripting.sightly.models.provider.version>
-    </properties>
-
     <build>
+        <testResources>
+            <testResource>
+                <directory>src/test/resources</directory>
+                <excludes>
+                    <exclude>**/.settings</exclude>
+                    <exclude>**/.settings/**</exclude>
+                    <exclude>**/.project</exclude>
+                    <exclude>**/.classpath</exclude>
+                    <exclude>**/target/**</exclude>
+                    <exclude>**/*.iml</exclude>
+                </excludes>
+            </testResource>
+        </testResources>
+        <extensions>
+            <extension>
+                <groupId>org.apache.maven.archetype</groupId>
+                <artifactId>archetype-packaging</artifactId>
+                <version>2.2</version>
+            </extension>
+        </extensions>
         <plugins>
             <plugin>
-                <artifactId>maven-clean-plugin</artifactId>
-                <configuration>
-                    <filesets>
-                        <fileset>
-                            <directory>${basedir}</directory>
-                            <includes>
-                                <include>derby.log</include>
-                            </includes>
-                        </fileset>
-                    </filesets>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>build-helper-maven-plugin</artifactId>
+                <artifactId>maven-antrun-plugin</artifactId>
                 <executions>
                     <execution>
-                        <id>reserve-network-port</id>
+                        <id>fix-crlfs</id>
+                        <phase>process-test-resources</phase>
+                            <configuration>
+                                <target>
+                                    <mkdir dir="${project.build.testOutputDirectory}" /> <!-- SLING-2804 -->
+                                    <fixcrlf srcdir="${project.build.testOutputDirectory}" />
+                                </target>
+                            </configuration>
                         <goals>
-                            <goal>reserve-network-port</goal>
+                            <goal>run</goal>
                         </goals>
-                        <phase>process-resources</phase>
-                        <configuration>
-                            <portNames>
-                                <portName>http.port</portName>
-                                <portName>sling.control.port</portName>
-                            </portNames>
-                        </configuration>
                     </execution>
                 </executions>
             </plugin>
+        </plugins>
+    </build>
+
+    <reporting>
+        <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-failsafe-plugin</artifactId>
-                <version>2.19.1</version>
-                <executions>
-                    <execution>
-                        <id>integration-tests</id>
-                        <goals>
-                            <goal>integration-test</goal>
-                            <goal>verify</goal>
-                        </goals>
-                    </execution>
-                </executions>
-                <configuration>
-                    <includes>
-                        <include>%regex[.*LaunchpadReadyIT.*]</include>
-                        <include>%regex[.*SlingSpecificsSightlyIT.*]</include>
-                        <include>%regex[.*TestsRunner.*]</include>
-                        <include>%regex[.*PerformanceIT.*]</include>
-                    </includes>
-                    <dependenciesToScan>
-                        <dependency>io.sightly:io.sightly.tck</dependency>
-                    </dependenciesToScan>
-                    <runOrder>alphabetical</runOrder>
-                    <excludes>
-                        <exclude>${failsafe.exclude}</exclude>
-                    </excludes>
-                    <systemPropertyVariables>
-                        <io.sightly.tck.serverURL>http://${test.host}:${http.port}</io.sightly.tck.serverURL>
-                        <launchpad.http.server.url>http://${test.host}:${http.port}/</launchpad.http.server.url>
-                        <launchpad.servlet.context>${http.base.path}</launchpad.servlet.context>
-                    </systemPropertyVariables>
-                </configuration>
+                <artifactId>maven-plugin-plugin</artifactId>
+                <version>2.5.1</version>
             </plugin>
             <plugin>
-                <groupId>org.apache.sling</groupId>
-                <artifactId>slingstart-maven-plugin</artifactId>
-                <version>1.7.7-SNAPSHOT</version>
-                <extensions>true</extensions>
-                <executions>
-                    <execution>
-                        <id>start-container</id>
-                        <goals>
-                            <goal>start</goal>
-                            <goal>stop</goal>
-                        </goals>
-                    </execution>
-                </executions>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-javadoc-plugin</artifactId>
                 <configuration>
-                    <usePomDependencies>true</usePomDependencies>
-                    <servers>
-                        <server>
-                            <port>${http.port}</port>
-                            <controlPort>${sling.control.port}</controlPort>
-                            <runmode>${sling.run.modes}</runmode>
-                            <contextPath>${http.base.path}</contextPath>
-                            <debug>${debug.options}</debug>
-                        </server>
-                    </servers>
+                    <!-- No javadocs -->
+                    <excludePackageNames>
+                        org.apache.sling
+                    </excludePackageNames>
                 </configuration>
             </plugin>
         </plugins>
-    </build>
-
-    <profiles>
-        <profile>
-            <!--
-                This profile allows running code coverage reports for the integration tests. In addition, if the other modules have been
-                built from the reactor, their jacoco reports will be merged to produce a report containing coverage information about
-                both unit and integration tests.
-
-                By default the latest snapshots will be used for generating the report. If, however, you want to run the report on
-                released versions then this can be achieved with the following command:
-
-                mvn clean verify -Pcoverage-report \
-                    -Dorg.apache.sling.scripting.sightly.compiler.version=1.0.2 \
-                    -Dorg.apache.sling.scripting.sightly.compiler.java.version=1.0.4 \
-                    -Dorg.apache.sling.scripting.sightly.version=1.0.26 \
-                    -Dorg.apache.sling.scripting.sightly.js.provider.version=1.0.16 \
-                    -Dorg.apache.sling.scripting.sightly.models.provider.version=1.0.4
-
-            -->
-            <id>coverage-report</id>
-            <activation>
-                <activeByDefault>false</activeByDefault>
-            </activation>
-            <properties>
-                <failsafe.exclude>%regex[.*PerformanceIT.*]</failsafe.exclude>
-            </properties>
-            <build>
-                <plugins>
-                    <plugin>
-                        <groupId>org.codehaus.mojo</groupId>
-                        <artifactId>build-helper-maven-plugin</artifactId>
-                        <executions>
-                            <execution>
-                                <phase>generate-sources</phase>
-                                <goals>
-                                    <goal>add-source</goal>
-                                </goals>
-                                <configuration>
-                                    <sources>
-                                        <source>${project.build.directory}/generated-sources</source>
-                                    </sources>
-                                </configuration>
-                            </execution>
-                        </executions>
-                    </plugin>
-                    <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-dependency-plugin</artifactId>
-                        <version>2.10</version>
-                        <configuration>
-                            <includeArtifactIds>
-                                org.apache.sling.scripting.sightly.compiler,
-                                org.apache.sling.scripting.sightly.compiler.java,
-                                org.apache.sling.scripting.sightly,
-                                org.apache.sling.scripting.sightly.js.provider,
-                                org.apache.sling.scripting.sightly.models.provider
-                            </includeArtifactIds>
-                            <transitive>false</transitive>
-                        </configuration>
-                        <executions>
-                            <execution>
-                                <id>copy-sources</id>
-                                <phase>generate-resources</phase>
-                                <goals>
-                                    <goal>unpack-dependencies</goal>
-                                </goals>
-                                <configuration>
-                                    <classifier>sources</classifier>
-                                    <failOnMissingClassifierArtifact>true</failOnMissingClassifierArtifact>
-                                    <outputDirectory>${project.build.directory}/generated-sources</outputDirectory>
-                                </configuration>
-                            </execution>
-                        </executions>
-                    </plugin>
-                    <plugin>
-                        <artifactId>maven-resources-plugin</artifactId>
-                        <version>3.0.1</version>
-                        <executions>
-                            <execution>
-                                <id>copy-resources</id>
-                                <phase>validate</phase>
-                                <goals>
-                                    <goal>copy-resources</goal>
-                                </goals>
-                                <configuration>
-                                    <outputDirectory>${basedir}/target/</outputDirectory>
-                                    <resources>
-                                        <resource>
-                                            <directory>../compiler/target/</directory>
-                                            <includes>
-                                                <include>jacoco.exec</include>
-                                            </includes>
-                                            <targetPath>compiler-jacoco</targetPath>
-                                        </resource>
-                                        <resource>
-                                            <directory>../java-compiler/target/</directory>
-                                            <includes>
-                                                <include>jacoco.exec</include>
-                                            </includes>
-                                            <targetPath>java-compiler-jacoco</targetPath>
-                                        </resource>
-                                        <resource>
-                                            <directory>../engine/target/</directory>
-                                            <includes>
-                                                <include>jacoco.exec</include>
-                                            </includes>
-                                            <targetPath>engine-jacoco</targetPath>
-                                        </resource>
-                                    </resources>
-                                </configuration>
-                            </execution>
-                        </executions>
-                    </plugin>
-                    <plugin>
-                        <groupId>org.apache.sling</groupId>
-                        <artifactId>slingstart-maven-plugin</artifactId>
-                        <extensions>true</extensions>
-                        <executions>
-                            <execution>
-                                <id>start-container</id>
-                                <goals>
-                                    <goal>start</goal>
-                                    <goal>stop</goal>
-                                </goals>
-                            </execution>
-                        </executions>
-                        <configuration>
-                            <usePomDependencies>true</usePomDependencies>
-                            <servers>
-                                <server>
-                                    <port>${http.port}</port>
-                                    <controlPort>${sling.control.port}</controlPort>
-                                    <runmode>${sling.run.modes}</runmode>
-                                    <contextPath>${http.base.path}</contextPath>
-                                    <debug>${jacoco.agent}</debug>
-                                </server>
-                            </servers>
-                        </configuration>
-                    </plugin>
-                    <plugin>
-                        <groupId>org.jacoco</groupId>
-                        <artifactId>jacoco-maven-plugin</artifactId>
-                        <version>${jacoco.maven.plugin.version}</version>
-                        <executions>
-                            <execution>
-                                <id>default-prepare-agent</id>
-                                <goals>
-                                    <goal>prepare-agent</goal>
-                                </goals>
-                                <configuration>
-                                    <propertyName>jacoco.agent</propertyName>
-                                    <destFile>${project.build.directory}/jacoco-it.exec</destFile>
-                                </configuration>
-                            </execution>
-                            <execution>
-                                <id>merge-reports</id>
-                                <phase>verify</phase>
-                                <goals>
-                                    <goal>merge</goal>
-                                </goals>
-                                <configuration>
-                                    <fileSets>
-                                        <fileSet>
-                                            <directory>${project.build.directory}</directory>
-                                            <includes>
-                                                <include>jacoco-it.exec</include>
-                                                <include>compiler-jacoco/jacoco.exec</include>
-                                                <include>java-compiler-jacoco/jacoco.exec</include>
-                                                <include>engine-jacoco/jacoco.exec</include>
-                                            </includes>
-                                        </fileSet>
-                                    </fileSets>
-                                    <destFile>${project.build.directory}/jacoco.exec</destFile>
-                                </configuration>
-                            </execution>
-                            <execution>
-                                <id>final-report</id>
-                                <phase>verify</phase>
-                                <goals>
-                                    <goal>report</goal>
-                                </goals>
-                                <configuration>
-                                    <includes>
-                                        <include>org/apache/sling/scripting/sightly/**/*</include>
-                                    </includes>
-                                    <excludes>
-                                        <exclude>org/apache/sling/scripting/sightly/impl/parser/expr/generated/**/*</exclude>
-                                    </excludes>
-                                </configuration>
-                            </execution>
-                            <execution>
-                                <id>check-coverage</id>
-                                <goals>
-                                    <goal>check</goal>
-                                </goals>
-                                <configuration>
-                                    <includes>
-                                        <include>org/apache/sling/scripting/sightly/**/*</include>
-                                    </includes>
-                                    <excludes>
-                                        <exclude>org/apache/sling/scripting/sightly/impl/parser/expr/generated/**/*</exclude>
-                                    </excludes>
-                                    <rules>
-                                        <rule>
-                                            <element>BUNDLE</element>
-                                            <limits>
-                                                <limit>
-                                                    <counter>INSTRUCTION</counter>
-                                                    <value>COVEREDRATIO</value>
-                                                    <minimum>0.80</minimum>
-                                                </limit>
-                                            </limits>
-                                        </rule>
-                                    </rules>
-                                </configuration>
-                            </execution>
-                        </executions>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-    </profiles>
-
-    <repositories>
-        <repository>
-            <id>oss-sonatype</id>
-            <name>OSS Sonatype</name>
-            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
-        </repository>
-    </repositories>
-
-    <dependencies>
-
-        <!-- The integration tests -->
-        <dependency>
-            <groupId>io.sightly</groupId>
-            <artifactId>io.sightly.tck</artifactId>
-            <version>1.3.5</version>
-            <scope>test</scope>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.slf4j</groupId>
-                    <artifactId>slf4j-simple</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-
-        <!-- Launchpad dependencies -->
-        <dependency>
-            <groupId>org.apache.sling</groupId>
-            <artifactId>org.apache.sling.scripting.sightly.compiler</artifactId>
-            <version>${org.apache.sling.scripting.sightly.compiler.version}</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.sling</groupId>
-            <artifactId>org.apache.sling.scripting.sightly.compiler.java</artifactId>
-            <version>${org.apache.sling.scripting.sightly.compiler.java.version}</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.sling</groupId>
-            <artifactId>org.apache.sling.scripting.sightly</artifactId>
-            <version>${org.apache.sling.scripting.sightly.version}</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.sling</groupId>
-            <artifactId>org.apache.sling.scripting.sightly.js.provider</artifactId>
-            <version>${org.apache.sling.scripting.sightly.js.provider.version}</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.sling</groupId>
-            <artifactId>org.apache.sling.scripting.sightly.models.provider</artifactId>
-            <version>${org.apache.sling.scripting.sightly.models.provider.version}</version>
-            <scope>provided</scope>
-        </dependency>
-
-        <!-- Dependencies for the Test Build and Run -->
-        <dependency>
-            <groupId>org.apache.sling</groupId>
-            <artifactId>org.apache.sling.commons.testing</artifactId>
-            <version>2.0.24</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>junit</groupId>
-                    <artifactId>junit-dep</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.slf4j</groupId>
-                    <artifactId>slf4j-simple</artifactId>
-                </exclusion>
-            </exclusions>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.sling</groupId>
-            <artifactId>org.apache.sling.testing.rules</artifactId>
-            <version>1.0.0</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-simple</artifactId>
-            <scope>compile</scope>
-        </dependency>
-
-        <!-- Dependency for running Sling performance tests -->
-        <dependency>
-            <groupId>org.apache.sling</groupId>
-            <artifactId>org.apache.sling.performance.base</artifactId>
-            <version>1.0.2</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.httpcomponents</groupId>
-            <artifactId>httpmime</artifactId>
-            <version>4.4</version>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
+    </reporting>
 </project>
diff --git a/src/main/provisioning/model.txt b/src/main/provisioning/model.txt
index 43653f5..dde07c4 100644
--- a/src/main/provisioning/model.txt
+++ b/src/main/provisioning/model.txt
@@ -16,34 +16,30 @@
 #  specific language governing permissions and limitations
 #  under the License.
 #
-
-[feature name=sling]
+[feature name=launchpad-testing]
 # Dependencies
 [artifacts]
   org.apache.sling/org.apache.sling.launchpad/10-SNAPSHOT/slingstart
-  org.apache.sling/org.apache.sling.scripting.sightly.compiler
-  org.apache.sling/org.apache.sling.scripting.sightly.compiler.java
-  org.apache.sling/org.apache.sling.scripting.sightly
-  org.apache.sling/org.apache.sling.scripting.sightly.js.provider
-  org.apache.sling/org.apache.sling.scripting.sightly.models.provider
-  org.apache.sling/org.apache.sling.scripting.sightly.testing-content/1.0.7-SNAPSHOT
-  org.apache.sling/org.apache.sling.scripting.core/2.0.49-SNAPSHOT
-
+  org.apache.sling/org.apache.sling.launchpad.test-bundles/0.0.3-SNAPSHOT/slingfeature
+  javax.servlet.jsp/javax.servlet.jsp-api/2.2.1
+  javax.el/javax.el-api/2.2.1
 
 # additional configuration for testing
 [configurations]
+  integrationTestsConfig
+    message="This test config should be loaded at startup"
+
+  org.apache.sling.servlets.resolver.SlingServletResolver
+    # Set the servlet resolver's cache size to zero for testing
+    servletresolver.cacheSize=I"0"
 
-  org.apache.sling.commons.log.LogManager.factory.config-2ef75700-a318-4eae-bed4-86777e1bdfd2
-    org.apache.sling.commons.log.pattern="{0,date,dd.MM.yyyy\ HH:mm:ss.SSS}\ *{4}*\ [{2}]\ {3}\ {5}"
-    org.apache.sling.commons.log.names=["org.apache.sling.scripting.sightly.js.impl.jsapi.ProxyAsyncScriptableFactory"]
-    org.apache.sling.commons.log.file="logs/error.log"
-    org.apache.sling.commons.log.level="error"
+  org.apache.sling.jcr.base.internal.LoginAdminWhitelist [mode=merge]
+    whitelist.bundles.regexp="org.apache.sling.(launchpad|junit).*"
 
-  org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl
-    resource.resolver.searchpath=["/apps", "/libs", "/sightlytck/scripts"]
+ # Test repository initialization from provisioning model
+ # No need to test all repoinit statements, this is done
+ # by the repoinit it module
+ [:repoinit]
+create path /repoinit/provisioningModelTest
 
-[:repoinit]
-  create path (sling:Folder) /sightlytck/scripts
-  set ACL for sling-scripting
-    allow   jcr:read    on /sightlytck/scripts
-  end
+create service user provisioningModelUser
diff --git a/src/test/resources/logback-test.xml b/src/test/resources/logback-test.xml
index a28514c..51c11bc 100644
--- a/src/test/resources/logback-test.xml
+++ b/src/test/resources/logback-test.xml
@@ -46,4 +46,4 @@
         <appender-ref ref="sift" />
     </root>
 
-</configuration>
+</configuration>
\ No newline at end of file

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

[sling-org-apache-sling-scripting-sightly-testing] 01/03: Revert "Fix typo in pom.xml : conncetion should be connection"

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

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-sightly-testing.git

commit 9ba9c981f0eff092d89305f1d4f0f8e841760cd6
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Mon Oct 23 12:26:57 2017 +0300

    Revert "Fix typo in pom.xml : conncetion should be connection"
    
    This reverts commit 5f226e2016d7054ced6a14962ab66ef21087e2e3.
---
 src/test/java/LaunchpadReadyIT.java                |  37 ++
 .../sightly/it/SlingSpecificsSightlyIT.java        | 392 +++++++++++++++++++++
 .../sightly/it/performance/PerformanceIT.java      | 124 +++++++
 src/test/resources/RepoPojo.java.original          |  23 ++
 src/test/resources/RepoPojo.java.updated           |  23 ++
 src/test/resources/update.html                     |  17 +
 src/test/resources/update.v2.html                  |  17 +
 7 files changed, 633 insertions(+)

diff --git a/src/test/java/LaunchpadReadyIT.java b/src/test/java/LaunchpadReadyIT.java
new file mode 100644
index 0000000..bcfc3e8
--- /dev/null
+++ b/src/test/java/LaunchpadReadyIT.java
@@ -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.
+ ******************************************************************************/
+
+import org.apache.sling.testing.clients.SlingClient;
+import org.apache.sling.testing.junit.rules.SlingInstanceRule;
+import org.junit.ClassRule;
+import org.junit.Test;
+
+public class LaunchpadReadyIT {
+
+    @ClassRule
+    public static final SlingInstanceRule SLING_INSTANCE_RULE = new SlingInstanceRule();
+
+    @Test
+    public void testLaunchpadReady() throws Exception {
+        SlingClient client = SLING_INSTANCE_RULE.getAdminClient();
+        client.waitUntilExists("/apps/sightly", 1000, 60);
+        client.waitUntilExists("/sightlytck", 1000, 60);
+    }
+
+}
diff --git a/src/test/java/org/apache/sling/scripting/sightly/it/SlingSpecificsSightlyIT.java b/src/test/java/org/apache/sling/scripting/sightly/it/SlingSpecificsSightlyIT.java
new file mode 100644
index 0000000..f7d49fd
--- /dev/null
+++ b/src/test/java/org/apache/sling/scripting/sightly/it/SlingSpecificsSightlyIT.java
@@ -0,0 +1,392 @@
+/*******************************************************************************
+ * 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.scripting.sightly.it;
+
+import java.io.IOException;
+
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.entity.EntityBuilder;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.entity.ContentType;
+import org.apache.http.entity.mime.MultipartEntityBuilder;
+import org.apache.http.entity.mime.content.InputStreamBody;
+import org.apache.http.impl.client.DefaultHttpClient;
+import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.sling.testing.clients.util.FormEntityBuilder;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import io.sightly.tck.html.HTMLExtractor;
+import io.sightly.tck.http.Client;
+
+import static org.junit.Assert.*;
+
+public class SlingSpecificsSightlyIT {
+
+    private static Client client;
+    private static String launchpadURL;
+    private static final String SLING_USE = "/sightly/use.html";
+    private static final String SLING_JAVA_USE_NPE = "/sightly/use.javaerror.html";
+    private static final String SLING_RESOURCE = "/sightly/resource.html";
+    private static final String SLING_RESOURCE_ACTUAL = "/sightly/actualresource.html";
+    private static final String SLING_TEMPLATE = "/sightly/template.html";
+    private static final String SLING_TEMPLATE_BAD_IDENTIFIER = "/sightly/template.bad-id.html";
+    private static final String SLING_JS_USE = "/sightly/use.jsuse.html";
+    private static final String SLING_JS_DEPENDENCY_RESOLUTION = "/sightly/use-sibling-dependency-resolution.html";
+    private static final String SLING_USE_INHERITANCE_WITHOVERLAY = "/sightly/useinheritance.html";
+    private static final String SLING_USE_INHERITANCE_WITHOUTOVERLAY = "/sightly/useinheritance.notoverlaid.html";
+    private static final String SLING_JAVA_USE_POJO_UPDATE = "/sightly/use.repopojo.html";
+    private static final String SLING_ATTRIBUTE_QUOTES = "/sightly/attributequotes.html";
+    private static final String SLING_CRLF = "/sightly/crlf";
+    private static final String SLING_CRLF_NOPKG = SLING_CRLF + ".nopkg.html";
+    private static final String SLING_CRLF_PKG = SLING_CRLF + ".pkg.html";
+    private static final String SLING_CRLF_WRONGPKG = SLING_CRLF + ".wrongpkg.html";
+    private static final String SLING_SCRIPT_UPDATE = "/sightly/update.html";
+    private static final String SLING_REQUEST_ATTRIBUTES = "/sightly/requestattributes.html";
+    private static final String SLING_REQUEST_ATTRIBUTES_INCLUDE = "/sightly/requestattributes.include.html";
+    private static final String SLING_RESOURCE_USE = "/sightly/use.resource.html";
+    private static final String SLING_I18N = "/sightly/i18n";
+    private static final String TCK_XSS = "/sightlytck/exprlang/xss.html";
+    private static final String WHITESPACE = "/sightly/whitespace.html";
+
+    @BeforeClass
+    public static void init() {
+        client = new Client();
+        launchpadURL = System.getProperty("launchpad.http.server.url");
+    }
+
+    @Test
+    public void testSlingModelsUseAPI() {
+        String url = launchpadURL + SLING_USE;
+        String pageContent = client.getStringContent(url, 200);
+        assertEquals("SUCCESS", HTMLExtractor.innerHTML(url, pageContent, "#reqmodel"));
+        assertEquals("SUCCESS", HTMLExtractor.innerHTML(url, pageContent, "#reqmodel-reqarg"));
+        assertEquals("nt:unstructured", HTMLExtractor.innerHTML(url, pageContent, "#reqmodel-bindings"));
+        assertEquals("SUCCESS", HTMLExtractor.innerHTML(url, pageContent, "#resmodel"));
+        
+    }
+    
+    @Test
+    public void testAdaptablesUseAPI() {
+        String url = launchpadURL + SLING_USE;
+        String pageContent = client.getStringContent(url, 200);
+        assertEquals("SUCCESS", HTMLExtractor.innerHTML(url, pageContent, "#resadapt"));
+        assertEquals("SUCCESS", HTMLExtractor.innerHTML(url, pageContent, "#reqadapt"));
+        assertEquals("SUCCESS", HTMLExtractor.innerHTML(url, pageContent, "#rradapt"));
+    }
+
+    @Test
+    public void testUseAPIWithOSGIService() {
+        String url = launchpadURL + SLING_USE;
+        String pageContent = client.getStringContent(url, 200);
+        assertEquals("Hello World!", HTMLExtractor.innerHTML(url, pageContent, "#osgi"));
+    }
+
+    @Test
+    public void testEnumConstantAsString() {
+        String url = launchpadURL + SLING_USE;
+        String pageContent = client.getStringContent(url, 200);
+        assertEquals("ENUM_CONSTANT", HTMLExtractor.innerHTML(url, pageContent, "#test-enum"));
+    }
+
+    @Test
+    public void testErroneousUseObject() {
+        String url = launchpadURL + SLING_JAVA_USE_NPE;
+        String pageContent = client.getStringContent(url, 500);
+        assertTrue(pageContent.contains("java.lang.NullPointerException"));
+    }
+
+    @Test
+    public void testDataSlyResourceArraySelectors() {
+        String url = launchpadURL + SLING_RESOURCE;
+        String pageContent = client.getStringContent(url, 200);
+        assertEquals("selectors: a.b", HTMLExtractor.innerHTML(url, pageContent, "#selectors span.selectors"));
+        assertEquals("selectors: a.b", HTMLExtractor.innerHTML(url, pageContent, "#selectors-remove-c span.selectors"));
+        assertEquals("selectors: a.c", HTMLExtractor.innerHTML(url, pageContent, "#removeselectors-remove-b span.selectors"));
+        assertEquals("selectors: a.b.c", HTMLExtractor.innerHTML(url, pageContent, "#addselectors span.selectors"));
+        assertEquals("It works", HTMLExtractor.innerHTML(url, pageContent, "#dot"));
+        assertEquals("path: /sightly/text.txt", HTMLExtractor.innerHTML(url, pageContent, "#extension-selectors span.path"));
+        assertEquals("selectors: a.b", HTMLExtractor.innerHTML(url, pageContent, "#extension-selectors span.selectors"));
+        assertEquals("path: /sightly/text.txt", HTMLExtractor.innerHTML(url, pageContent, "#extension-replaceselectors span.path"));
+        assertEquals("selectors: c", HTMLExtractor.innerHTML(url, pageContent, "#extension-replaceselectors span.selectors"));
+    }
+
+    @Test
+    public void testDataSlyResourceResolution() {
+        String url = launchpadURL + SLING_RESOURCE;
+        String pageContent = client.getStringContent(url, 200);
+
+        assertEquals("resource.with.dots.in.path", HTMLExtractor.innerHTML(url, pageContent, "#_sightly_resource_with_dots_in_path span" +
+                ".name"));
+        assertEquals("/sightly/resource.with.dots.in.path", HTMLExtractor.innerHTML(url, pageContent, "#_sightly_resource_with_dots_in_path span" +
+                ".path"));
+        assertEquals("false", HTMLExtractor.innerHTML(url, pageContent, "#_sightly_resource_with_dots_in_path span" +
+                ".synthetic"));
+
+        assertEquals("nonexistingresource", HTMLExtractor.innerHTML(url, pageContent, "#_sightly_nonexistingresource span" +
+                ".name"));
+        assertEquals("/sightly/nonexistingresource", HTMLExtractor.innerHTML(url, pageContent, "#_sightly_nonexistingresource span" +
+                ".path"));
+        assertEquals("true", HTMLExtractor.innerHTML(url, pageContent, "#_sightly_nonexistingresource span.synthetic"));
+
+        assertEquals("resource", HTMLExtractor.innerHTML(url, pageContent, "#_sightly_resource span" +
+                ".name"));
+        assertEquals("/sightly/resource", HTMLExtractor.innerHTML(url, pageContent, "#_sightly_resource span" +
+                ".path"));
+        assertEquals("false", HTMLExtractor.innerHTML(url, pageContent, "#_sightly_resource span.synthetic"));
+    }
+
+    @Test
+    public void testDataSlyTemplate() {
+        String url = launchpadURL + SLING_TEMPLATE;
+        String pageContent = client.getStringContent(url, 200);
+        assertEquals("SUCCESS", HTMLExtractor.innerHTML(url, pageContent, "#template"));
+    }
+
+    @Test
+    public void testBadTemplateIdentifier() {
+        String url = launchpadURL + SLING_TEMPLATE_BAD_IDENTIFIER;
+        String pageContent = client.getStringContent(url, 500);
+        assertTrue(pageContent.contains(
+                "org.apache.sling.scripting.sightly.java.compiler.SightlyJavaCompilerException: Unsupported identifier name: bad-template-id"));
+    }
+
+    @Test
+    public void testJSUseAPI() {
+        String url = launchpadURL + SLING_JS_USE;
+        String pageContent = client.getStringContent(url, 200);
+        assertEquals("use", HTMLExtractor.innerHTML(url, pageContent, "#resource-name"));
+        assertEquals("use", HTMLExtractor.innerHTML(url, pageContent, "#resource-getName"));
+        assertEquals("/apps/sightly/scripts/use", HTMLExtractor.innerHTML(url, pageContent, "#resource-resourceType"));
+        assertEquals("/apps/sightly/scripts/use", HTMLExtractor.innerHTML(url, pageContent, "#resource-getResourceType"));
+    }
+
+    @Test
+    public void testJSUseAPISiblingDependencies() {
+        String url = launchpadURL + SLING_JS_DEPENDENCY_RESOLUTION;
+        String pageContent = client.getStringContent(url, 200);
+        assertEquals("/apps/sightly/scripts/siblingdeps/dependency.js", HTMLExtractor.innerHTML(url, pageContent, "#js-rep-res"));
+    }
+
+    @Test
+    public void testUseAPIInheritanceOverlaying() {
+        String url = launchpadURL + SLING_USE_INHERITANCE_WITHOVERLAY;
+        String pageContent = client.getStringContent(url, 200);
+        assertEquals("child.javaobject", HTMLExtractor.innerHTML(url, pageContent, "#javaobj"));
+        assertEquals("child.javascriptobject", HTMLExtractor.innerHTML(url, pageContent, "#javascriptobj"));
+        assertEquals("child.ecmaobject", HTMLExtractor.innerHTML(url, pageContent, "#ecmaobj"));
+        assertEquals("child.template", HTMLExtractor.innerHTML(url, pageContent, "#templateobj"));
+        assertEquals("child.partials.javascript", HTMLExtractor.innerHTML(url, pageContent, "#partialsjs"));
+        assertEquals("child.partials.ecmaobject", HTMLExtractor.innerHTML(url, pageContent, "#partialsecma"));
+        assertEquals("child.partials.template", HTMLExtractor.innerHTML(url, pageContent, "#partialstemplate"));
+        assertEquals("child.partials.included", HTMLExtractor.innerHTML(url, pageContent, "#partialsincluded"));
+        assertEquals("child.partials.javaobject", HTMLExtractor.innerHTML(url, pageContent, "#partialsjava"));
+    }
+
+    @Test
+    public void testUseAPIInheritanceWithoutOverlay() {
+        String url = launchpadURL + SLING_USE_INHERITANCE_WITHOUTOVERLAY;
+        String pageContent = client.getStringContent(url, 200);
+        assertEquals("notoverlaid", HTMLExtractor.innerHTML(url, pageContent, "#notoverlaid"));
+    }
+
+    @Test
+    public void testRepositoryPojoUpdate() throws Exception {
+        String url = launchpadURL + SLING_JAVA_USE_POJO_UPDATE;
+        String pageContent = client.getStringContent(url, 200);
+        assertEquals("original", HTMLExtractor.innerHTML(url + System.currentTimeMillis(), pageContent, "#repopojo"));
+        uploadFile("RepoPojo.java.updated", "RepoPojo.java", "/apps/sightly/scripts/use");
+        Thread.sleep(1000);
+        pageContent = client.getStringContent(url, 200);
+        assertEquals("updated", HTMLExtractor.innerHTML(url + System.currentTimeMillis(), pageContent, "#repopojo"));
+        uploadFile("RepoPojo.java.original", "RepoPojo.java", "/apps/sightly/scripts/use");
+        Thread.sleep(1000);
+        pageContent = client.getStringContent(url, 200);
+        assertEquals("original", HTMLExtractor.innerHTML(url + System.currentTimeMillis(), pageContent, "#repopojo"));
+    }
+
+    @Test
+    public void testRepositoryPojoUpdateDirty() throws Exception {
+        String url = launchpadURL + SLING_JAVA_USE_POJO_UPDATE;
+        String pageContent = client.getStringContent(url, 200);
+        assertEquals("original", HTMLExtractor.innerHTML(url + System.currentTimeMillis(), pageContent, "#repopojo"));
+
+        uploadFile("RepoPojo.java.updated", "RepoPojo.java", "/apps/sightly/scripts/use");
+        Thread.sleep(1000);
+        restartSightlyEngineBundle();
+
+        pageContent = client.getStringContent(url, 200);
+        assertEquals("updated", HTMLExtractor.innerHTML(url + System.currentTimeMillis(), pageContent, "#repopojo"));
+
+        uploadFile("RepoPojo.java.original", "RepoPojo.java", "/apps/sightly/scripts/use");
+        Thread.sleep(1000);
+        restartSightlyEngineBundle();
+
+        pageContent = client.getStringContent(url, 200);
+        assertEquals("original", HTMLExtractor.innerHTML(url + System.currentTimeMillis(), pageContent, "#repopojo"));
+    }
+
+    @Test
+    public void testScriptUpdate() throws Exception {
+        String url = launchpadURL + SLING_SCRIPT_UPDATE;
+        String pageContent = client.getStringContent(url, 200);
+        assertEquals("Hello world!", HTMLExtractor.innerHTML(url + System.currentTimeMillis(), pageContent, "#update"));
+        uploadFile("update.v2.html", "update.html", "/apps/sightly/scripts/update");
+        Thread.sleep(1000);
+        pageContent = client.getStringContent(url, 200);
+        assertEquals("Hello, John Doe!", HTMLExtractor.innerHTML(url + System.currentTimeMillis(), pageContent, "#update"));
+        uploadFile("update.html", "update.html", "/apps/sightly/scripts/update");
+        Thread.sleep(1000);
+        pageContent = client.getStringContent(url, 200);
+        assertEquals("Hello world!", HTMLExtractor.innerHTML(url + System.currentTimeMillis(), pageContent, "#update"));
+    }
+
+    @Test
+    public void testRepositoryPojoNoPkg() {
+        String url = launchpadURL + SLING_USE;
+        String pageContent = client.getStringContent(url, 200);
+        assertEquals("nopkg", HTMLExtractor.innerHTML(url, pageContent, "#repopojo-nopkg"));
+    }
+
+    @Test
+    public void testAttributeQuotes() {
+        String url = launchpadURL + SLING_ATTRIBUTE_QUOTES;
+        String pageContent = client.getStringContent(url, 200);
+        // need to test against the raw content
+        assertTrue(pageContent.contains("<span data-resource='{\"resource\" : \"/sightly/attributequotes\"}'>/sightly/attributequotes</span>"));
+        assertTrue(pageContent.contains("<span data-resource=\"/sightly/attributequotes\">/sightly/attributequotes</span>"));
+        assertTrue(pageContent.contains("<span data-resource=\"/sightly/attributequotes\">/sightly/attributequotes</span>"));
+    }
+
+    @Test
+    public void testCRLFNoPkg() {
+        String url = launchpadURL + SLING_CRLF_NOPKG;
+        String pageContent = client.getStringContent(url, 200);
+        assertEquals("nopkg", HTMLExtractor.innerHTML(url, pageContent, "#repopojocrlf-nopkg"));
+    }
+
+    @Test
+    public void testCRLFPkg() {
+        String url = launchpadURL + SLING_CRLF_PKG;
+        String pageContent = client.getStringContent(url, 200);
+        assertEquals("pkg", HTMLExtractor.innerHTML(url, pageContent, "#repopojocrlf-pkg"));
+    }
+
+    @Test
+    public void testCRLFWrongPkg() {
+        String url = launchpadURL + SLING_CRLF_WRONGPKG;
+        String pageContent = client.getStringContent(url, 500);
+        assertTrue(pageContent.contains("Compilation errors in apps/sightly/scripts/crlf/RepoPojoWrongPkgCRLF.java"));
+    }
+
+    @Test
+    public void actualResource() {
+        String url = launchpadURL + SLING_RESOURCE_ACTUAL;
+        String pageContent = client.getStringContent(url, 200);
+        String hash = HTMLExtractor.innerHTML(url, pageContent, "#hash");
+        String actual = HTMLExtractor.innerHTML(url, pageContent, "#actual");
+        String path = HTMLExtractor.innerHTML(url, pageContent, "#path");
+        assertEquals(hash, actual);
+        assertNotEquals(hash, path);
+    }
+
+    @Test
+    public void testRequestAttributes() {
+        String url = launchpadURL + SLING_REQUEST_ATTRIBUTES;
+        String pageContent = client.getStringContent(url, 200);
+        assertEquals("testValue", HTMLExtractor.innerHTML(url, pageContent, "#attrs-set"));
+        assertEquals("", HTMLExtractor.innerHTML(url, pageContent, "#attrs-unset"));
+    }
+
+    @Test
+    public void testRequestAttributesInclude() {
+        String url = launchpadURL + SLING_REQUEST_ATTRIBUTES_INCLUDE;
+        String pageContent = client.getStringContent(url, 200);
+        assertEquals("testValue", HTMLExtractor.innerHTML(url, pageContent, "#attrs-set"));
+        assertEquals("", HTMLExtractor.innerHTML(url, pageContent, "#attrs-unset"));
+    }
+
+    @Test
+    public void testResourceUse() {
+        String url = launchpadURL + SLING_RESOURCE_USE;
+        String pageContent = client.getStringContent(url, 200);
+        assertEquals("foobar-someresource", HTMLExtractor.innerHTML(url, pageContent, "#someresource .data"));
+        assertEquals("foobar-somefolder", HTMLExtractor.innerHTML(url, pageContent, "#somefolder .data"));
+        assertEquals("foobar-sometemplate", HTMLExtractor.innerHTML(url, pageContent, "#sometemplate .data"));
+        assertEquals("foobar-somejava", HTMLExtractor.innerHTML(url, pageContent, "#somejava .data"));
+        assertEquals("foobar-somejs", HTMLExtractor.innerHTML(url, pageContent, "#somejs .data"));
+        assertEquals("foobar-someecma", HTMLExtractor.innerHTML(url, pageContent, "#someecma .data"));
+    }
+
+    @Test
+    public void testI18nBasename() {
+        String url = launchpadURL + SLING_I18N + ".basename.html";
+        String pageContent = client.getStringContent(url, 200);
+        assertEquals("die Bank", HTMLExtractor.innerHTML(url, pageContent, "#i18n-basename-finance"));
+        assertEquals("das Ufer", HTMLExtractor.innerHTML(url, pageContent, "#i18n-nobasename"));
+    }
+
+    @Test
+    public void testXSSAttributeEscaping() {
+        String url = launchpadURL + TCK_XSS;
+        String pageContent = client.getStringContent(url, 200);
+        assertTrue(pageContent.contains("<p id=\"req-context-8\" onclick=\"console.log('red')\">Paragraph</p>"));
+    }
+
+    @Test
+    public void testWhiteSpaceExpressions() {
+        String url = launchpadURL + WHITESPACE;
+        String pageContent = client.getStringContent(url, 200);
+        assertEquals("true", HTMLExtractor.innerHTML(url, pageContent, "#nbsp"));
+        assertEquals("true", HTMLExtractor.innerHTML(url, pageContent, "#tab"));
+        assertEquals("true", HTMLExtractor.innerHTML(url, pageContent, "#newline"));
+    }
+
+    private void restartSightlyEngineBundle() throws InterruptedException, IOException {
+        HttpClient httpClient = HttpClientBuilder.create().build();
+        HttpPost post = new HttpPost(launchpadURL + "/system/console/bundles/org.apache.sling.scripting.sightly");
+        // Stop bundle
+        FormEntityBuilder formBuilder = FormEntityBuilder.create();
+        post.setHeader("Authorization", "Basic YWRtaW46YWRtaW4=");
+        formBuilder.addParameter("action", "stop");
+        post.setEntity(formBuilder.build());
+        httpClient.execute(post);
+        Thread.sleep(1000);
+        // Start bundle
+        formBuilder = FormEntityBuilder.create();
+        post.setHeader("Authorization", "Basic YWRtaW46YWRtaW4=");
+        formBuilder.addParameter("action", "start");
+        post.setEntity(formBuilder.build());
+        httpClient.execute(post);
+        Thread.sleep(1000);
+    }
+
+    private void uploadFile(String fileName, String serverFileName, String url) throws IOException {
+        HttpClient httpClient = HttpClientBuilder.create().build();
+        HttpPost post = new HttpPost(launchpadURL + url);
+        post.setHeader("Authorization", "Basic YWRtaW46YWRtaW4=");
+        MultipartEntityBuilder entityBuilder = MultipartEntityBuilder.create();
+        InputStreamBody inputStreamBody = new InputStreamBody(this.getClass().getClassLoader().getResourceAsStream(fileName),
+                ContentType.TEXT_PLAIN, fileName);
+        entityBuilder.addPart(serverFileName, inputStreamBody);
+        post.setEntity(entityBuilder.build());
+        httpClient.execute(post);
+    }
+
+}
diff --git a/src/test/java/org/apache/sling/scripting/sightly/it/performance/PerformanceIT.java b/src/test/java/org/apache/sling/scripting/sightly/it/performance/PerformanceIT.java
new file mode 100644
index 0000000..614065a
--- /dev/null
+++ b/src/test/java/org/apache/sling/scripting/sightly/it/performance/PerformanceIT.java
@@ -0,0 +1,124 @@
+/*******************************************************************************
+ * 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.scripting.sightly.it.performance;
+
+import org.apache.commons.httpclient.HttpStatus;
+import org.apache.commons.lang.StringUtils;
+import org.apache.sling.performance.PerformanceRunner;
+import org.apache.sling.performance.PerformanceRunner.Parameters;
+import org.apache.sling.performance.PerformanceRunner.ReportLevel;
+import org.apache.sling.performance.annotation.PerformanceTest;
+
+import org.junit.FixMethodOrder;
+import org.junit.runner.RunWith;
+import org.junit.runners.MethodSorters;
+
+import io.sightly.tck.http.Client;
+
+/**
+ * Performance Integration Tests for Sightly
+ */
+@RunWith(PerformanceRunner.class)
+@Parameters(reportLevel= ReportLevel.MethodLevel, referenceMethod = PerformanceIT.REFERENCE_METHOD)
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+public class PerformanceIT {
+
+    private static final int INVOCATIONS = 20;
+    private static final int WARMUP_INVOCATIONS = 15;
+    private static final int CONTENT_LOOP_COUNT = 20;
+    public static final String REFERENCE_METHOD = "test1Jsp";
+
+    private Client client;
+    private String serverURL;
+
+    private class Constants {
+        public static final String SYS_PROP_SERVER_URL = "launchpad.http.server.url";
+        public static final String SYS_PROP_USER = "launchpad.http.server.user";
+        public static final String SYS_PROP_PASS = "launchpad.http.server.pass";
+    }
+
+    /**
+     * Default constructor, initializes HTTP client
+     */
+    public PerformanceIT() {
+        serverURL = System.getProperty(Constants.SYS_PROP_SERVER_URL);
+        String user = System.getProperty(Constants.SYS_PROP_USER);
+        String password = System.getProperty(Constants.SYS_PROP_PASS);
+        if (StringUtils.isNotEmpty(user) && StringUtils.isNotEmpty(password)) {
+            client = new Client(user, password);
+        } else {
+            client = new Client();
+        }
+    }
+
+    /**
+     * Helper method to read content from an URL
+     *
+     * @param url URL
+     * @param expectedStatusCode Expected status code
+     *
+     * @return Actual string content
+     */
+    private String getStringContent(String url, int expectedStatusCode) {
+        return client.getStringContent(serverURL + url, expectedStatusCode);
+    }
+
+    @PerformanceTest(runinvocations = INVOCATIONS, warmupinvocations = WARMUP_INVOCATIONS)
+    public void test1Jsp() {
+        getStringContent("/sightlyperf/loop.html?selector=jsp&count=" + CONTENT_LOOP_COUNT,
+                HttpStatus.SC_OK);
+    }
+
+    @PerformanceTest(runinvocations = INVOCATIONS, warmupinvocations = WARMUP_INVOCATIONS)
+    public void test2JspEL() {
+        getStringContent("/sightlyperf/loop.html?selector=jsp-el&count=" + CONTENT_LOOP_COUNT,
+                HttpStatus.SC_OK);
+    }
+
+    @PerformanceTest(runinvocations = INVOCATIONS, warmupinvocations = WARMUP_INVOCATIONS, threshold = 2)
+    public void test3SlyJavaPojoRepo() {
+        getStringContent("/sightlyperf/loop.html?selector=sly-java-pojo-repo&count=" + CONTENT_LOOP_COUNT,
+                HttpStatus.SC_OK);
+    }
+
+    @PerformanceTest(runinvocations = INVOCATIONS, warmupinvocations = WARMUP_INVOCATIONS, threshold = 2)
+    public void test4SlyJavaPojoBundle() {
+        getStringContent("/sightlyperf/loop.html?selector=sly-java-pojo-bundle&count=" + CONTENT_LOOP_COUNT,
+            HttpStatus.SC_OK);
+    }
+
+    @PerformanceTest(runinvocations = INVOCATIONS, warmupinvocations = WARMUP_INVOCATIONS, threshold = 3)
+    public void test5SlyJavaSlingModels() {
+        getStringContent("/sightlyperf/loop.html?selector=sly-java-slingmodels&count=" + CONTENT_LOOP_COUNT,
+            HttpStatus.SC_OK);
+    }
+
+    @PerformanceTest(runinvocations = INVOCATIONS, warmupinvocations = WARMUP_INVOCATIONS, threshold = 4)
+    public void test6SlyJSAsync() {
+        getStringContent("/sightlyperf/loop.html?selector=sly-js-async&count=" + CONTENT_LOOP_COUNT,
+                HttpStatus.SC_OK);
+    }
+
+    @PerformanceTest(runinvocations = INVOCATIONS, warmupinvocations = WARMUP_INVOCATIONS, threshold = 4)
+    public void test7SlyJSSync() {
+        getStringContent("/sightlyperf/loop.html?selector=sly-js-sync&count=" + CONTENT_LOOP_COUNT,
+            HttpStatus.SC_OK);
+    }
+
+}
diff --git a/src/test/resources/RepoPojo.java.original b/src/test/resources/RepoPojo.java.original
new file mode 100644
index 0000000..4491c65
--- /dev/null
+++ b/src/test/resources/RepoPojo.java.original
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * 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 apps.sightly.scripts.use;
+
+public class RepoPojo {
+
+    public static final String message = "original";
+
+}
diff --git a/src/test/resources/RepoPojo.java.updated b/src/test/resources/RepoPojo.java.updated
new file mode 100644
index 0000000..e2c9e04
--- /dev/null
+++ b/src/test/resources/RepoPojo.java.updated
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * 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 apps.sightly.scripts.use;
+
+public class RepoPojo {
+
+    public static final String message = "updated";
+
+}
diff --git a/src/test/resources/update.html b/src/test/resources/update.html
new file mode 100644
index 0000000..49abbf6
--- /dev/null
+++ b/src/test/resources/update.html
@@ -0,0 +1,17 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  ~ 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.
+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+<div id="update" data-sly-text="${'Hello world!'}">replace me!</div>
diff --git a/src/test/resources/update.v2.html b/src/test/resources/update.v2.html
new file mode 100644
index 0000000..375512b
--- /dev/null
+++ b/src/test/resources/update.v2.html
@@ -0,0 +1,17 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  ~ 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.
+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+<div id="update" data-sly-text="${'Hello, John Doe!'}">replace me!</div>

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

[sling-org-apache-sling-scripting-sightly-testing] 03/03: Fix typo in pom.xml : conncetion should be connection

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

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-sightly-testing.git

commit 919e3426882a1c8ff01441e7eb2e72557fb4d3df
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Mon Oct 23 12:27:35 2017 +0300

    Fix typo in pom.xml : conncetion should be connection
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 3dc07a9..6a55b53 100644
--- a/pom.xml
+++ b/pom.xml
@@ -33,7 +33,7 @@
     <description>Maven archetype for JSP Taglib</description>
 
     <scm>
-        <connection>scm:git:https://gitbox.apache.org/repos/asf/sling-taglib-archetype.git</conncetion>
+        <connection>scm:git:https://gitbox.apache.org/repos/asf/sling-taglib-archetype.git</connection>
         <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/sling-taglib-archetype.git</developerConnection>
         <url>https://gitbox.apache.org/repos/asf?p=sling-taglib-archetype.git</url>
     </scm>

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