Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSONP Platform TCK: Refactor the tests in servlet vehicle #1318

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
290 changes: 290 additions & 0 deletions glassfish-runner/jsonp-platform-tck/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,290 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
http://www.eclipse.org/legal/epl-2.0.

This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the
Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
version 2 with the GNU Classpath Exception, which is available at
https://www.gnu.org/software/classpath/license.html.

SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
<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.glassfish</groupId>
<artifactId>standalone-tck</artifactId>
<version>11.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>jakarta</groupId>
<artifactId>glassfish.jsonp-platform-tck</artifactId>
<version>11.0.0-SNAPSHOT</version>
<packaging>jar</packaging>

<properties>
<arquillian.junit>1.7.0.Alpha14</arquillian.junit>
<!-- Use JDK17 to run with GF 8.0.0-JDK17-M5 -->
<glassfish.container.version>8.0.0-JDK17-M5</glassfish.container.version>
<!-- Use JDK21 to run with GF 8.0.0-M5 -->
<!-- <glassfish.container.version>8.0.0-M5</glassfish.container.version> -->
<glassfish.toplevel.dir>glassfish8</glassfish.toplevel.dir>
<jakarta.platform.version>11.0.0-M2</jakarta.platform.version>
<junit.jupiter.version>5.9.1</junit.jupiter.version>
<tck.artifactId>jsonp-platform-tck</tck.artifactId>
<tck.version>11.0.0-SNAPSHOT</tck.version>
</properties>

<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${junit.jupiter.version}</version>
</dependency>
<dependency>
<groupId>jakarta.tck</groupId>
<artifactId>${tck.artifactId}</artifactId>
<version>${tck.version}</version>
</dependency>
<dependency>
<groupId>jakarta.json.bind</groupId>
<artifactId>jakarta.json.bind-api</artifactId>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-api</artifactId>
<version>2.1.3</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jakarta.platform</groupId>
<artifactId>jakarta.jakartaee-api</artifactId>
<version>${jakarta.platform.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>3.1</version>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-container-test-spi</artifactId>
<version>${arquillian.junit}</version>
</dependency>
<dependency>
<groupId>org.glassfish.main.common</groupId>
<artifactId>simple-glassfish-api</artifactId>
<version>${glassfish.container.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.junit5</groupId>
<artifactId>arquillian-junit5-container</artifactId>
<version>${arquillian.junit}</version>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.junit5</groupId>
<artifactId>arquillian-junit5-core</artifactId>
<version>${arquillian.junit}</version>
</dependency>
<dependency>
<groupId>org.omnifaces.arquillian</groupId>
<artifactId>arquillian-glassfish-server-managed</artifactId>
<version>1.4</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>01-unpack</id>
<goals>
<goal>unpack</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.glassfish.main.distributions</groupId>
<artifactId>${glassfish-artifact-id}</artifactId>
<version>${glassfish.container.version}</version>
<type>zip</type>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>02-asadmin-permission</id>
<goals>
<goal>run</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<target>
<chmod dir="target/glassfish8/glassfish/bin/asadmin" perm="777"></chmod>
</target>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>03-StopDomain1</id>
<goals>
<goal>exec</goal>
</goals>
<phase>pre-integration-test</phase>
<configuration>
<executable>${project.build.directory}/${glassfish.toplevel.dir}/glassfish/bin/asadmin</executable>
<arguments>
<argument>stop-domain</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>04-StartDomain1</id>
<goals>
<goal>exec</goal>
</goals>
<phase>pre-integration-test</phase>
<configuration>
<executable>${project.build.directory}/${glassfish.toplevel.dir}/glassfish/bin/asadmin</executable>
<arguments>
<argument>start-domain</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>05-Enable Trace requests</id>
<goals>
<goal>exec</goal>
</goals>
<phase>pre-integration-test</phase>
<configuration>
<executable>${project.build.directory}/${glassfish.toplevel.dir}/glassfish/bin/asadmin</executable>
<arguments>
<argument>set</argument>
<argument>server-config.network-config.protocols.protocol.http-listener-1.http.trace-enabled=true</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>06-StopDomain</id>
<goals>
<goal>exec</goal>
</goals>
<phase>pre-integration-test</phase>
<configuration>
<executable>${project.build.directory}/${glassfish.toplevel.dir}/glassfish/bin/asadmin</executable>
<arguments>
<argument>stop-domain</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.0.0-M5</version>
<executions>
<execution>
<id>pluggability-tests</id>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
<configuration>
<!-- <additionalClasspathElements>
<additionalClasspathElement>${project.build.directory}/${glassfish.toplevel.dir}/glassfish/modules/parsson.jar</additionalClasspathElement>
</additionalClasspathElements> -->
<excludes>
<exclude>**/PatchTestsIT.java</exclude>
</excludes>
<dependenciesToScan>jakarta.tck:${tck.artifactId}</dependenciesToScan>
<systemPropertyVariables>
<GLASSFISH_HOME>${project.build.directory}/${glassfish.toplevel.dir}</GLASSFISH_HOME>
<glassfish.home>${project.build.directory}/${glassfish.toplevel.dir}</glassfish.home>
<junit.log.traceflag>true</junit.log.traceflag>
<harness.log.traceflag>true</harness.log.traceflag>
<cts.harness.debug>true</cts.harness.debug>
<java.io.tmpdir>/tmp</java.io.tmpdir>
</systemPropertyVariables>
<environmentVariables>
<GLASSFISH_HOME>${project.build.directory}/${glassfish.toplevel.dir}</GLASSFISH_HOME>
</environmentVariables>
</configuration>
</execution>
<execution>
<id>patch-tests</id>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
<configuration>
<additionalClasspathElements>
<additionalClasspathElement>${project.build.directory}/${glassfish.toplevel.dir}/glassfish/modules/parsson.jar</additionalClasspathElement>
</additionalClasspathElements>
<includes>
<include>**/PatchTestsIT.java</include>
</includes>
<dependenciesToScan>jakarta.tck:${tck.artifactId}</dependenciesToScan>
<systemPropertyVariables>
<GLASSFISH_HOME>${project.build.directory}/${glassfish.toplevel.dir}</GLASSFISH_HOME>
<glassfish.home>${project.build.directory}/${glassfish.toplevel.dir}</glassfish.home>
<junit.log.traceflag>true</junit.log.traceflag>
<harness.log.traceflag>true</harness.log.traceflag>
<cts.harness.debug>true</cts.harness.debug>
<java.io.tmpdir>/tmp</java.io.tmpdir>
</systemPropertyVariables>
<environmentVariables>
<GLASSFISH_HOME>${project.build.directory}/${glassfish.toplevel.dir}</GLASSFISH_HOME>
</environmentVariables>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>full</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<glassfish-artifact-id>glassfish</glassfish-artifact-id>
</properties>
</profile>
<profile>
<id>web</id>
<properties>
<glassfish-artifact-id>web</glassfish-artifact-id>
</properties>
</profile>
</profiles>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<arquillian xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://jboss.org/schema/arquillian"
xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">

<engine>
<!-- property name="deploymentExportPath">target/</property -->
</engine>

<group qualifier="glassfish-servers" default="true">
<container qualifier="http" default="true">
<configuration>
<property name="glassFishHome">target/glassfish8</property>
</configuration>
</container>
</group>

</arquillian>
46 changes: 41 additions & 5 deletions jsonp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,28 +26,64 @@
<version>11.0.0-SNAPSHOT</version>
</parent>

<artifactId>jsonp</artifactId>
<artifactId>jsonp-platform-tck</artifactId>
<packaging>jar</packaging>

<name>JSONP</name>
<description>JSONP</description>

<properties>
<arquillian.junit>1.7.0.Alpha14</arquillian.junit>
<jakarta.inject-api.version>2.0.1</jakarta.inject-api.version>
<jakarta.json-api.version>2.1.3</jakarta.json-api.version>
<jakarta.json.bind-api.version>3.0.1</jakarta.json.bind-api.version>
<junit.jupiter.version>5.9.1</junit.jupiter.version>
</properties>

<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>libutil</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>common</artifactId>
<version>11.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>javatest</groupId>
<artifactId>javatest</artifactId>
</dependency>
<dependency>
<groupId>jakarta.inject</groupId>
<artifactId>jakarta.inject-api</artifactId>
<version>${jakarta.inject-api.version}</version>
</dependency>
<dependency>
<groupId>jakarta.json.bind</groupId>
<artifactId>jakarta.json.bind-api</artifactId>
<version>${jakarta.json.bind-api.version}</version>
</dependency>
<dependency>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-api</artifactId>
<version>${jakarta.json-api.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.shrinkwrap</groupId>
<artifactId>shrinkwrap-api</artifactId>
<version>1.2.6</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${junit.jupiter.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.junit5</groupId>
<artifactId>arquillian-junit5-container</artifactId>
<version>${arquillian.junit}</version>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.junit5</groupId>
<artifactId>arquillian-junit5-core</artifactId>
<version>${arquillian.junit}</version>
</dependency>
</dependencies>
<build>
Expand Down
Loading