-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1023 from OndroMih/gf-batch-tck-runner
GlassFish Batch TCK runner
- Loading branch information
Showing
9 changed files
with
732 additions
and
0 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 |
---|---|---|
|
@@ -21,3 +21,4 @@ target/ | |
*.iml | ||
.project | ||
.idea | ||
/glassfish-runner/batch-tck/apitests/test.properties |
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,40 @@ | ||
<!--- | ||
Copyright (c) 2022 Contributors to the Eclipse Foundation | ||
See the NOTICE file distributed with this work for additional information regarding copyright | ||
ownership. Licensed 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. | ||
SPDX-License-Identifier: Apache-2.0 | ||
---> | ||
|
||
# Executing Jakarta Batch TCK against GlassFish | ||
|
||
To test the setup, run: | ||
|
||
``` | ||
mvn clean verify -Dit.test=CDITests | ||
``` | ||
|
||
To run the full TCK, execute: | ||
|
||
``` | ||
mvn clean verify | ||
``` | ||
|
||
## Details | ||
|
||
This module is composed of 2 modules, which are executed from the root module: | ||
|
||
* apitests - executes API behavior tests against a running GlassFish server | ||
* sigtest - executes API signature tests against GlassFish classes | ||
|
||
Each of the modules can be executed separately by going into its directory and execute the same command as for the root module: | ||
|
||
``` | ||
mvn clean verify | ||
``` |
Binary file added
BIN
+830 Bytes
glassfish-runner/batch-tck/apitests/hack-around-batch-tck-parent.jar
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
36 changes: 36 additions & 0 deletions
36
glassfish-runner/batch-tck/apitests/src/test/resources/arquillian.xml
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,36 @@ | ||
<?xml version="1.0"?> | ||
<!-- | ||
Copyright (c) 2021-2022 Contributors to the Eclipse Foundation | ||
See the NOTICE file distributed with this work for additional information regarding copyright | ||
ownership. Licensed 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. | ||
SPDX-License-Identifier: Apache-2.0 --> | ||
<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"> | ||
|
||
<!-- Uncomment to have test archives exported to the file system for inspection --> | ||
<!-- | ||
<engine> | ||
<property name="deploymentExportPath">target/</property> | ||
</engine> | ||
--> | ||
|
||
--> | ||
<container qualifier="glassfish-remote"> | ||
<configuration> | ||
<property name="adminHost">localhost</property> | ||
<property name="adminHttps">false</property> | ||
<property name="authorisation">false</property> | ||
<property name="adminPort">4848</property> | ||
</configuration> | ||
</container> | ||
|
||
|
||
</arquillian> |
87 changes: 87 additions & 0 deletions
87
glassfish-runner/batch-tck/apitests/src/test/resources/derby.ddl.jbatch-tck.sql
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,87 @@ | ||
CONNECT 'jdbc:derby://localhost:1527/batch;create=true'; | ||
|
||
DROP TABLE Numbers; | ||
DROP TABLE Orders; | ||
DROP TABLE Inventory; | ||
|
||
CREATE TABLE Numbers | ||
( | ||
item INT, | ||
quantity INT | ||
); | ||
|
||
CREATE TABLE Orders | ||
( | ||
orderID INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1) PRIMARY KEY, | ||
itemID INT, | ||
quantity INT | ||
); | ||
|
||
CREATE TABLE Inventory | ||
( | ||
itemID INT NOT NULL PRIMARY KEY, | ||
quantity INT NOT NULL | ||
); | ||
|
||
INSERT INTO Inventory | ||
VALUES (1, 100); | ||
|
||
INSERT INTO Numbers | ||
VALUES (1, 10); | ||
|
||
INSERT INTO Numbers | ||
VALUES (2, 10); | ||
|
||
INSERT INTO Numbers | ||
VALUES (3, 10); | ||
|
||
INSERT INTO Numbers | ||
VALUES (4, 10); | ||
|
||
INSERT INTO Numbers | ||
VALUES (5, 10); | ||
|
||
INSERT INTO Numbers | ||
VALUES (6, 10); | ||
|
||
INSERT INTO Numbers | ||
VALUES (7, 10); | ||
|
||
INSERT INTO Numbers | ||
VALUES (8, 10); | ||
|
||
INSERT INTO Numbers | ||
VALUES (9, 10); | ||
|
||
INSERT INTO Numbers | ||
VALUES (10, 10); | ||
|
||
INSERT INTO Numbers | ||
VALUES (11, 10); | ||
|
||
INSERT INTO Numbers | ||
VALUES (12, 10); | ||
|
||
INSERT INTO Numbers | ||
VALUES (13, 10); | ||
|
||
INSERT INTO Numbers | ||
VALUES (14, 10); | ||
|
||
INSERT INTO Numbers | ||
VALUES (15, 10); | ||
|
||
INSERT INTO Numbers | ||
VALUES (16, 10); | ||
|
||
INSERT INTO Numbers | ||
VALUES (17, 10); | ||
|
||
INSERT INTO Numbers | ||
VALUES (18, 10); | ||
|
||
INSERT INTO Numbers | ||
VALUES (19, 10); | ||
|
||
INSERT INTO Numbers | ||
VALUES (20, 10); |
Binary file not shown.
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,63 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright (c) 2022 Contributors to the Eclipse Foundation | ||
See the NOTICE file distributed with this work for additional information | ||
regarding copyright ownership. Licensed 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. | ||
SPDX-License-Identifier: Apache-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/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>jakarta.batch</groupId> | ||
<artifactId>jakarta.batch.arquillian.exec-parent</artifactId> | ||
<version>2.1.0</version> | ||
</parent> | ||
|
||
<groupId>org.glassfish</groupId> | ||
<artifactId>glassfish.batch-tck</artifactId> | ||
|
||
<packaging>pom</packaging> | ||
<name>Jakarta Batch TCK Runner for Glassfish</name> | ||
|
||
<properties> | ||
<glassfish.container.version>7.0.0-M4</glassfish.container.version> | ||
<glassfish.toplevel.dir>glassfish7</glassfish.toplevel.dir> | ||
<jakarta.batch.version>2.1.0</jakarta.batch.version> | ||
</properties> | ||
|
||
<modules> | ||
<module>sigtests</module> | ||
<module>apitests</module> | ||
</modules> | ||
|
||
<dependencies> | ||
|
||
<!-- The parent project brings a dependency on `jakarta.batch.reporting` with group `${project.groupId}`, which isn't derived from the group of the parent, but actually from the group of the current project, which is `org.glassfish`. Such an artifact doesn't exist and it has to be ignored. There's no simple way to exclude a dependency defined in a parent POM except copying everything from the parent POM to this project. So, until this is fixed in the parent POM, we'll provide this dependency locally as an empty JAR file. | ||
--> | ||
|
||
<dependency> | ||
<groupId>org.glassfish</groupId> | ||
<artifactId>jakarta.batch.reporting</artifactId> | ||
<version>10000</version> | ||
<scope>system</scope> | ||
<systemPath>${project.basedir}/hack-around-batch-tck-parent.jar</systemPath> | ||
</dependency> | ||
|
||
|
||
</dependencies> | ||
|
||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<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/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<!-- We don't use the root module as a parent because it brings unnecessary dependencies, which we can't exclude from the sigtest classpath --> | ||
|
||
<artifactId>glassfish.batch-tck.sigtests</artifactId> | ||
<groupId>org.glassfish</groupId> | ||
<version>2.1.0</version> | ||
|
||
<properties> | ||
<glassfish.container.version>7.0.0-M4</glassfish.container.version> | ||
<glassfish.toplevel.dir>glassfish7</glassfish.toplevel.dir> | ||
<jakarta.batch.version>2.1.0</jakarta.batch.version> | ||
</properties> | ||
|
||
<profiles> | ||
<profile> | ||
<id>jdk11</id> | ||
<activation> | ||
<activeByDefault>false</activeByDefault> | ||
<jdk>11</jdk> | ||
</activation> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.netbeans.tools</groupId> | ||
<artifactId>sigtest-maven-plugin</artifactId> | ||
|
||
<configuration> | ||
<sigfile>${project.build.directory}/sigtest-copy/sigtest/sigtest-1.6-batch.standalone.tck.sig-2.1-se11-OpenJDK-J9</sigfile> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</profile> | ||
<profile> | ||
<id>jdk17</id> | ||
<activation> | ||
<activeByDefault>false</activeByDefault> | ||
<jdk>17</jdk> | ||
</activation> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.netbeans.tools</groupId> | ||
<artifactId>sigtest-maven-plugin</artifactId> | ||
<configuration> | ||
<sigfile>${project.build.directory}/sigtest-copy/sigtest/sigtest-1.6-batch.standalone.tck.sig-2.1-se17-TemurinHotSpot</sigfile> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</profile> | ||
</profiles> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-dependency-plugin</artifactId> | ||
<version>3.3.0</version> | ||
<executions> | ||
<execution> | ||
<id>unpack-sigfiles</id> | ||
<goals> | ||
<goal>unpack</goal> | ||
</goals> | ||
<phase>pre-integration-test</phase> | ||
<configuration> | ||
<artifactItems> | ||
<artifactItem> | ||
<groupId>jakarta.batch</groupId> | ||
<artifactId>com.ibm.jbatch.tck</artifactId> | ||
<version>${jakarta.batch.version}</version> | ||
</artifactItem> | ||
</artifactItems> | ||
<includes>sigtest/*</includes> | ||
<outputDirectory>${project.build.directory}/sigtest-copy</outputDirectory> | ||
</configuration> | ||
</execution> | ||
<execution> | ||
<id>unpack-classes</id> | ||
<goals> | ||
<goal>unpack</goal> | ||
</goals> | ||
<phase>pre-integration-test</phase> | ||
<configuration> | ||
<artifactItems> | ||
<artifactItem> | ||
<groupId>org.glassfish.main.distributions</groupId> | ||
<artifactId>glassfish</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.1.0</version> | ||
<executions> | ||
<execution> | ||
<id>default-cli</id> | ||
<phase>pre-integration-test</phase> | ||
<goals> | ||
<goal>run</goal> | ||
</goals> | ||
<configuration> | ||
<target> | ||
<unzip dest="${project.build.directory}/classes"> | ||
<fileset dir="${project.build.directory}/${glassfish.toplevel.dir}/glassfish/modules"> | ||
<include name="*.jar"/> | ||
</fileset> | ||
</unzip> | ||
</target> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.netbeans.tools</groupId> | ||
<artifactId>sigtest-maven-plugin</artifactId> | ||
<version>1.6</version> | ||
<executions> | ||
<execution> | ||
<id>default-cli</id> | ||
<phase>integration-test</phase> | ||
<goals> | ||
<goal>check</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
<configuration> | ||
<action>strictcheck</action> | ||
<failOnError>true</failOnError> | ||
<packages>jakarta.batch.**</packages> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |