Skip to content

Commit

Permalink
JSONP appclient tests running with Glassfish (#1565)
Browse files Browse the repository at this point in the history
* jsonp appclient tests runnable

* add logging properties, fix compilation error

* add alternate provider to CP, correct the junit tags

* 36 jsonprovidertests passing
  • Loading branch information
alwin-joseph authored Oct 9, 2024
1 parent e33315e commit 9db8649
Show file tree
Hide file tree
Showing 21 changed files with 3,969 additions and 257 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2,463 changes: 2,463 additions & 0 deletions glassfish-runner/jsonp-platform-tck/jakartaeetck/bin/ts.jte

Large diffs are not rendered by default.

805 changes: 805 additions & 0 deletions glassfish-runner/jsonp-platform-tck/jakartaeetck/bin/tssql.stmt

Large diffs are not rendered by default.

169 changes: 135 additions & 34 deletions glassfish-runner/jsonp-platform-tck/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
<arquillian.junit>1.9.1.Final</arquillian.junit>
<!-- Use JDK17 to run with GF 8.0.0-JDK17-M5 -->
<glassfish.container.version>8.0.0-JDK17-M5</glassfish.container.version>
<glassfish.home>${project.build.directory}/${glassfish.toplevel.dir}</glassfish.home>
<glassfish.lib.dir>${glassfish.home}/glassfish/lib</glassfish.lib.dir>
<!-- 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>
Expand All @@ -38,6 +40,7 @@
<tck.version>11.0.0-SNAPSHOT</tck.version>
<ts.home>/jakartaeetck</ts.home>
<version.jakarta.tck>11.0.0-SNAPSHOT</version.jakarta.tck>
<version.jakarta.tck.arquillian>1.0.0-M17</version.jakarta.tck.arquillian>
</properties>

<dependencyManagement>
Expand All @@ -49,6 +52,20 @@
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-bom</artifactId>
<version>${arquillian.junit}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-build</artifactId>
<version>${arquillian.junit}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

Expand All @@ -58,6 +75,12 @@
<artifactId>junit-jupiter</artifactId>
<version>${junit.jupiter.version}</version>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>jakarta.tck</groupId>
<artifactId>${tck.artifactId}</artifactId>
Expand All @@ -76,19 +99,24 @@
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jakarta.platform</groupId>
<artifactId>jakarta.jakartaee-api</artifactId>
<version>${jakarta.platform.version}</version>
<scope>provided</scope>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-container-test-spi</artifactId>
<version>${arquillian.junit}</version>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>3.1</version>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-container-spi</artifactId>
<version>${arquillian.junit}</version>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-container-test-spi</artifactId>
<groupId>org.jboss.arquillian.core</groupId>
<artifactId>arquillian-core-spi</artifactId>
<version>${arquillian.junit}</version>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.test</groupId>
<artifactId>arquillian-test-impl-base</artifactId>
<version>${arquillian.junit}</version>
</dependency>
<dependency>
<groupId>org.glassfish.main.common</groupId>
Expand All @@ -98,23 +126,35 @@
<dependency>
<groupId>org.jboss.arquillian.junit5</groupId>
<artifactId>arquillian-junit5-container</artifactId>
<version>${arquillian.junit}</version>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.junit</groupId>
<artifactId>arquillian-junit-core</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>
<version>1.6</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>jakarta.tck.arquillian</groupId>
<artifactId>arquillian-protocol-appclient</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.jboss.shrinkwrap</groupId>
<artifactId>shrinkwrap-impl-base</artifactId>
<version>1.2.6</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.shrinkwrap.resolver</groupId>
<artifactId>shrinkwrap-resolver-api</artifactId>
Expand All @@ -135,7 +175,6 @@
<artifactId>shrinkwrap-resolver-spi-maven</artifactId>
<version>3.2.0</version>
</dependency>

<dependency>
<groupId>jakarta.tck.arquillian</groupId>
<artifactId>arquillian-protocol-javatest</artifactId>
Expand Down Expand Up @@ -178,22 +217,22 @@
<artifactId>tck-porting-lib</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>jakarta.tck</groupId>
<artifactId>common</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>jakarta.tck</groupId>
<artifactId>libutil</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>jakarta.tck</groupId>
<artifactId>runtime</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>central</id>
<url>https://repo1.maven.org/maven2</url>
</repository>
<repository>
<id>jboss</id>
<url>https://repository.jboss.org/nexus/content/repositories/releases/</url>
</repository>
<repository>
<id>jakarta-snapshots</id>
<url>https://jakarta.oss.sonatype.org/content/repositories/staging/</url>
</repository>
</repositories>

<build>
<plugins>
Expand Down Expand Up @@ -247,7 +286,60 @@
<version>3.6.1</version>
<executions>
<execution>
<id>07-copy-protocol-lib</id>
<id>004-copy-lib</id>
<goals>
<goal>copy</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<artifactItems>
<artifactItem>
<groupId>jakarta.tck</groupId>
<artifactId>libutil</artifactId>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
<destFileName>libutil.jar</destFileName>
</artifactItem>
<artifactItem>
<groupId>jakarta.tck</groupId>
<artifactId>common</artifactId>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
<destFileName>common.jar</destFileName>
</artifactItem>
<artifactItem>
<groupId>jakarta.tck.arquillian</groupId>
<artifactId>tck-porting-lib</artifactId>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
<destFileName>tck-porting-lib.jar</destFileName>
</artifactItem>
<artifactItem>
<groupId>jakarta.tck</groupId>
<artifactId>runtime</artifactId>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
<destFileName>runtime.jar</destFileName>
</artifactItem>
<artifactItem>
<groupId>jakarta.tck</groupId>
<artifactId>${tck.artifactId}</artifactId>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
<destFileName>jsonp-platform-tck.jar</destFileName>
</artifactItem>
<artifactItem>
<groupId>jakarta.tck.arquillian</groupId>
<artifactId>arquillian-protocol-lib</artifactId>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
<destFileName>arquillian-protocol-lib.jar</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>
<execution>
<id>03-copy-protocol-lib</id>
<goals>
<goal>copy</goal>
</goals>
Expand Down Expand Up @@ -286,7 +378,7 @@
<additionalClasspathElement>${project.build.directory}/${glassfish.toplevel.dir}/glassfish/modules/parsson.jar</additionalClasspathElement>
</additionalClasspathElements>
<includes>
<include>com/sun/ts/tests/jsonp/api/patchtests/**TestsIT.java</include>
<include>com/sun/ts/tests/jsonp/api/patchtests/**Test*.java</include>
</includes>
<!-- Select the @Tag("tck-appclient") tests -->
<groups>tck-appclient</groups>
Expand All @@ -298,6 +390,7 @@
<harness.log.traceflag>true</harness.log.traceflag>
<cts.harness.debug>true</cts.harness.debug>
<java.io.tmpdir>/tmp</java.io.tmpdir>
<project.basedir>${project.basedir}</project.basedir>
<arquillian.xml>appclient-arquillian.xml</arquillian.xml>
</systemPropertyVariables>
<environmentVariables>
Expand All @@ -316,7 +409,7 @@
<additionalClasspathElement>${project.build.directory}/${glassfish.toplevel.dir}/glassfish/modules/parsson.jar</additionalClasspathElement>
</additionalClasspathElements>
<includes>
<include>com/sun/ts/tests/jsonp/api/patchtests/**TestsIT.java</include>
<include>com/sun/ts/tests/jsonp/api/patchtests/**Test*.java</include>
</includes>
<!-- Select the @Tag("tck-javatest") tests -->
<groups>tck-javatest</groups>
Expand All @@ -343,11 +436,11 @@
<goal>verify</goal>
</goals>
<configuration>
<!-- <additionalClasspathElements>
<additionalClasspathElements>
<additionalClasspathElement>${project.build.directory}/${glassfish.toplevel.dir}/glassfish/modules/parsson.jar</additionalClasspathElement>
</additionalClasspathElements> -->
</additionalClasspathElements>
<includes>
<include>com/sun/ts/tests/jsonp/pluggability/jsonprovidertests/**IT.java</include>
<include>com/sun/ts/tests/jsonp/pluggability/jsonprovidertests/**Test.java</include>
</includes>
<!-- Select the @Tag("tck-appclient") tests -->
<groups>tck-appclient</groups>
Expand All @@ -359,8 +452,16 @@
<harness.log.traceflag>true</harness.log.traceflag>
<cts.harness.debug>true</cts.harness.debug>
<java.io.tmpdir>/tmp</java.io.tmpdir>
<project.basedir>${project.basedir}</project.basedir>
<arquillian.xml>appclient-arquillian.xml</arquillian.xml>
</systemPropertyVariables>
<properties>
<configurationParameters>junit.jupiter.extensions.autodetection.enabled = true
junit.platform.output.capture.stderr = true
junit.platform.output.capture.stdout = true
junit.platform.reporting.open.xml.enabled = true
junit.platform.reporting.output.dir = target/junit5-reports</configurationParameters>
</properties>
<environmentVariables>
<GLASSFISH_HOME>${project.build.directory}/${glassfish.toplevel.dir}</GLASSFISH_HOME>
</environmentVariables>
Expand All @@ -377,7 +478,7 @@
<additionalClasspathElement>${project.build.directory}/${glassfish.toplevel.dir}/glassfish/modules/parsson.jar</additionalClasspathElement>
</additionalClasspathElements> -->
<includes>
<include>com/sun/ts/tests/jsonp/pluggability/jsonprovidertests/**IT.java</include>
<include>com/sun/ts/tests/jsonp/pluggability/jsonprovidertests/**Test.java</include>
</includes>
<!-- Select the @Tag("tck-javatest") tests -->
<groups>tck-javatest</groups>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* 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
*/

package org.glassfish.jsonp.tck;

import org.jboss.arquillian.container.test.spi.client.deployment.ApplicationArchiveProcessor;
import org.jboss.arquillian.test.spi.enricher.resource.ResourceProvider;
import org.jboss.arquillian.core.spi.LoadableExtension;

public class GlassfishLoadableExtension implements LoadableExtension {
@Override
public void register(ExtensionBuilder extensionBuilder) {
extensionBuilder.service(ResourceProvider.class, GlassfishTestArchiveProcessor.class);
extensionBuilder.observer(GlassfishTestArchiveProcessor.class);

}
}
Loading

0 comments on commit 9db8649

Please sign in to comment.