-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SOAP standalone TCK refactor with Junit and Arquillian (#1204)
* refactor with junit annotation, setup parameters. Signed-off-by: Gurunandan Rao <[email protected]> * logger changes. Signed-off-by: Gurunandan Rao <[email protected]> * ShrinkWrap and Arquillian support. Signed-off-by: Gurunandan Rao <[email protected]> * format code and fixs for refactored code. Signed-off-by: Gurunandan Rao <[email protected]> * logger update for saaj. Signed-off-by: Gurunandan Rao <[email protected]> * default porting class fix. Signed-off-by: Gurunandan Rao <[email protected]> --------- Signed-off-by: Gurunandan Rao <[email protected]>
- Loading branch information
Showing
151 changed files
with
51,497 additions
and
50,081 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,177 @@ | ||
<!-- | ||
Copyright (c) 2023 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"> | ||
<groupId>jakarta</groupId> | ||
<artifactId>glassfish.saaj-tck</artifactId> | ||
<version>10.0.0-SNAPSHOT</version> | ||
<packaging>jar</packaging> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>org.glassfish</groupId> | ||
<artifactId>standalone-tck</artifactId> | ||
<version>10.0.0</version> | ||
<relativePath>../pom.xml</relativePath> | ||
</parent> | ||
<properties> | ||
<tck.artifactId>jakarta.saaj-tck</tck.artifactId> | ||
<tck.version>3.0.0</tck.version> | ||
<arquillian.core.version>1.7.0.Alpha10</arquillian.core.version> | ||
</properties> | ||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.junit</groupId> | ||
<artifactId>junit-bom</artifactId> | ||
<version>${junit.jupiter.version}</version> | ||
<type>pom</type> | ||
<scope>import</scope> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter</artifactId> | ||
<version>${junit.jupiter.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>jakartatck</groupId> | ||
<artifactId>common</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>jakartatck</groupId> | ||
<artifactId>libutil</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>jakartatck</groupId> | ||
<artifactId>saaj-tck</artifactId> | ||
<version>10.0.0-SNAPSHOT</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.arquillian.container</groupId> | ||
<artifactId>arquillian-container-test-spi</artifactId> | ||
<version>${arquillian.core.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.arquillian.junit5</groupId> | ||
<artifactId>arquillian-junit5-container</artifactId> | ||
<version>${arquillian.core.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.junit.vintage</groupId> | ||
<artifactId>junit-vintage-engine</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.omnifaces.arquillian</groupId> | ||
<artifactId>arquillian-glassfish-server-managed</artifactId> | ||
<version>1.2</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
<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> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-dependency-plugin</artifactId> | ||
<version>3.2.0</version> | ||
<executions> | ||
<execution> | ||
<id>unpack</id> | ||
<phase>pre-integration-test</phase> | ||
<goals> | ||
<goal>unpack</goal> | ||
</goals> | ||
<configuration> | ||
<artifactItems> | ||
<artifactItem> | ||
<groupId>org.glassfish.main.distributions</groupId> | ||
<artifactId>${glassfish-artifact-id}</artifactId> | ||
<version>${glassfish.container.version}</version> | ||
<type>zip</type> | ||
<overWrite>true</overWrite> | ||
<outputDirectory>${project.build.directory}</outputDirectory> | ||
</artifactItem> | ||
</artifactItems> | ||
</configuration> | ||
</execution> | ||
<execution> | ||
<id>copy-dependecies</id> | ||
<phase>pre-integration-test</phase> | ||
<goals> | ||
<goal>copy-dependencies</goal> | ||
</goals> | ||
<configuration> | ||
<includeGroupIds>jakartatck</includeGroupIds> | ||
<outputDirectory>${project.build.directory}/${glassfish.toplevel.dir}/glassfish/lib</outputDirectory> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-failsafe-plugin</artifactId> | ||
<version>3.0.0-M5</version> | ||
<executions> | ||
<execution> | ||
<id>gf-tests</id> | ||
<goals> | ||
<goal>integration-test</goal> | ||
<goal>verify</goal> | ||
</goals> | ||
<configuration> | ||
<includes> | ||
<include>**/*Client*.*</include> | ||
</includes> | ||
<additionalClasspathElements> | ||
<additionalClasspathElement>${project.build.directory}/${glassfish.toplevel.dir}/glassfish/modules/webservices-osgi.jar</additionalClasspathElement> | ||
<additionalClasspathElement>${project.build.directory}/${glassfish.toplevel.dir}/glassfish/modules/jaxb-osgi.jar</additionalClasspathElement> | ||
</additionalClasspathElements> | ||
<dependenciesToScan>jakartatck:saaj-tck</dependenciesToScan> | ||
<systemPropertyVariables> | ||
<glassfish.home>${project.build.directory}/${glassfish.toplevel.dir}</glassfish.home> | ||
<webServerHost>localhost</webServerHost> | ||
<webServerPort>8080</webServerPort> | ||
<porting.ts.url.class.1>com.sun.ts.lib.porting.implementation.SunRIURL</porting.ts.url.class.1> | ||
</systemPropertyVariables> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85 changes: 85 additions & 0 deletions
85
runtime/src/main/java/com/sun/ts/lib/porting/implementation/SunRIURL.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
/* | ||
* Copyright (c) 2007, 2023 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 com.sun.ts.lib.porting.implementation; | ||
|
||
import java.net.MalformedURLException; | ||
import java.net.URL; | ||
|
||
import com.sun.ts.lib.porting.TSURLInterface; | ||
|
||
// import com.sun.ts.lib.porting.TSURLInterface; | ||
|
||
/** | ||
* This is a J2EE Reference specific implementation of the TSURLInterface which | ||
* is to be used for J2EE-TS testing. TS tests use this interface to obtain the | ||
* URL String to use to access a given web component. If a given J2EE Server | ||
* implmentation requires that URLs be created in a different manner, then this | ||
* implementation can be replaced. | ||
* | ||
* @author Kyle Grucci | ||
*/ | ||
public class SunRIURL implements TSURLInterface { | ||
private URL url = null; | ||
|
||
/** | ||
* This method is called by TS tests to get the URL to use to access a given web | ||
* component. | ||
* | ||
* @param protocol - the name of the protocol. | ||
* @param host - the name of the host. | ||
* @param port - the port number. | ||
* @param file - the host file. | ||
* @return a valid URL object. | ||
*/ | ||
public URL getURL(String protocol, String host, int port, String file) throws MalformedURLException { | ||
try { | ||
url = new URL(protocol, host, port, file); | ||
} catch (MalformedURLException e) { | ||
// logger.log(Logger.Level.ERROR,"Failed during URL creation", e); | ||
throw e; | ||
} | ||
return url; | ||
} | ||
|
||
/** | ||
* This method is called by TS tests to get the URL to use to access a given web | ||
* component. | ||
* | ||
* @param protocol - the name of the protocol. | ||
* @param host - the name of the host. | ||
* @param port - the port number. | ||
* @param file - the host file. | ||
* @return a valid URL as a String. | ||
*/ | ||
public String getURLString(String protocol, String host, int port, String file) { | ||
if (file.startsWith("/")) | ||
return protocol + "://" + host + ":" + port + file; | ||
else | ||
return protocol + "://" + host + ":" + port + "/" + file; | ||
} | ||
|
||
/** | ||
* This method is called by TS tests to get the request string to use to access | ||
* a given web component. | ||
* | ||
* @param request - the request file. | ||
* @return a valid String object. | ||
*/ | ||
public String getRequest(String request) { | ||
return request; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.