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

Add runner for concurrency TCK #23982

Merged
merged 5 commits into from
Jun 9, 2022
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
226 changes: 226 additions & 0 deletions appserver/tests/tck/concurrency/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,226 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
* Copyright (c) 2022 Contributors to the Eclipse Foundation
*
* 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/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.glassfish.main.tests.tck</groupId>
<artifactId>tck</artifactId>
<version>7.0.0-SNAPSHOT</version>
</parent>

<artifactId>glassfish-external-tck-concurrency</artifactId>

<name>Concurrency TCK runner 4.0 for Concurrency RI (GlassFish)</name>
<description>Aggregates dependencies and runs the Concurrency TCK on GlassFish</description>

<properties>
<maven.compiler.release>11</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<concurrency.tck-3-0.version>3.0.0</concurrency.tck-3-0.version>

<glassfish.version>${project.version}</glassfish.version>
<glassfish.root>${project.build.directory}</glassfish.root>
<glassfish.home>${glassfish.root}/glassfish7</glassfish.home>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-bom</artifactId>
<version>1.7.0.Alpha10</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<!-- Jakarta EE APIs -->
<dependency>
<groupId>jakarta.enterprise.concurrent</groupId>
<artifactId>jakarta.enterprise.concurrent-api</artifactId>
</dependency>

<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
</dependency>


<!-- The TCK -->
<dependency>
<groupId>jakarta.enterprise.concurrent</groupId>
<artifactId>jakarta.enterprise.concurrent-tck</artifactId>
<version>${concurrency.tck-3-0.version}</version>
<scope>test</scope>
</dependency>

<!-- Utility classes for TestNG and Arquillian, used in suite.xml -->
<dependency>
<groupId>jakarta.enterprise</groupId>
<artifactId>cdi-tck-core-impl</artifactId>
<version>4.0.4</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>jakarta.el</groupId>
<artifactId>jakarta.el-api</artifactId>
</exclusion>
<exclusion>
<groupId>jakarta.faces</groupId>
<artifactId>jakarta.faces-api</artifactId>
</exclusion>
<exclusion>
<artifactId>container-se-api</artifactId>
<groupId>org.jboss.arquillian.container</groupId>
</exclusion>
</exclusions>
</dependency>


<!--
The Arquillian connector that starts GlassFish and deploys archives to it.
-->
<dependency>
<groupId>org.omnifaces.arquillian</groupId>
<artifactId>arquillian-glassfish-server-managed</artifactId>
<version>1.2</version>
</dependency>

<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>7.4.0</version>
</dependency>

<!-- Signature Test Plugin -->
<dependency>
<groupId>org.netbeans.tools</groupId>
<artifactId>sigtest-maven-plugin</artifactId>
<version>1.6</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<!-- Disable annotation processor for test sources -->
<testCompilerArgument>-proc:none</testCompilerArgument>
</configuration>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-glassfish</id>
<phase>test-compile</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<markersDirectory>${glassfish.root}/dependency-maven-plugin-markers</markersDirectory>
<artifactItems>
<artifactItem>
<groupId>org.glassfish.main.distributions</groupId>
<artifactId>glassfish</artifactId>
<version>${glassfish.version}</version>
<type>zip</type>
<overWrite>false</overWrite>
<outputDirectory>${glassfish.root}</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-Xmx768m</argLine>

<!-- Surefire / TestNG Properties -->
<!-- The suite, the exclude and the test dependencies together determine which tests are being run -->
<suiteXmlFiles>
<suiteXmlFile>suite.xml</suiteXmlFile>
</suiteXmlFiles>
<dependenciesToScan>
<dependency>jakarta.enterprise.concurrent:jakarta.enterprise.concurrent-tck</dependency>
</dependenciesToScan>
<properties>
<property>
<name>surefire.testng.verbose</name>
<value>1</value>
</property>
</properties>
<forkMode>once</forkMode>

<!-- System Properties -->
<systemPropertyVariables>
<glassfish.home>${glassfish.root}/glassfish7</glassfish.home>
<glassfish.enableDerby>true</glassfish.enableDerby>
<glassfish.maxHeapSize>2048m</glassfish.maxHeapSize>

<!-- Remove comments for logging to file. Following logging with e.g. tail -f ConcurrentTCK00.log -->
<!--
<java.util.logging.config.file>${project.build.directory}/test-classes/logging.properties</java.util.logging.config.file>

<glassfish.systemProperties>
java.util.logging.config.file=${project.build.directory}/test-classes/logging.properties
</glassfish.systemProperties>
-->

<glassfish.postBootCommands>
create-file-user --groups staff:mgr --passwordfile ${project.build.directory}/test-classes/j2ee.pass j2ee
create-file-user --groups Manager --passwordfile ${project.build.directory}/test-classes/javajoe.pass javajoe
</glassfish.postBootCommands>
</systemPropertyVariables>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>3.0.0-M6</version>
<executions>
<execution>
<id>generate-test-report</id>
<phase>verify</phase>
<goals>
<goal>report-only</goal>
</goals>
</execution>
</executions>
<configuration>
<outputDirectory>${project.build.directory}/surefire-reports</outputDirectory>
<outputName>test-report</outputName>
</configuration>
</plugin>
</plugins>
</build>

</project>
16 changes: 16 additions & 0 deletions appserver/tests/tck/concurrency/src/test/resources/j2ee.pass
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#
# Copyright (c) 2021 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
#
AS_ADMIN_USERPASSWORD=j2ee
16 changes: 16 additions & 0 deletions appserver/tests/tck/concurrency/src/test/resources/javajoe.pass
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#
# Copyright (c) 2021 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
#
AS_ADMIN_USERPASSWORD=javajoe
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Ensure that both your client and sever JVMs point to this file using the java.util.logging property
# -Djava.util.logging.config.file=/path/to/logging.properties

#Handlers we plan to use
handlers=java.util.logging.FileHandler,java.util.logging.ConsoleHandler

#Global logger - By default only log warnings
.level=WARNING

#Concurrency logger - By default log everything for concurrency loggers
ee.jakarta.tck.concurrent.level=ALL

#Formatting for the simple formatter
java.util.logging.SimpleFormatter.class.log=true
java.util.logging.SimpleFormatter.class.full=false
java.util.logging.SimpleFormatter.class.length=30

java.util.logging.SimpleFormatter.level.log=true

java.util.logging.SimpleFormatter.method.log=true
java.util.logging.SimpleFormatter.method.length=30

java.util.logging.SimpleFormatter.thread.log=true
java.util.logging.SimpleFormatter.thread.length=3

java.util.logging.SimpleFormatter.time.log=true
java.util.logging.SimpleFormatter.time.format=[MM/dd/yyyy HH:mm:ss:SSS z]

java.util.logging.SimpleFormatter.format=[%1$tF %1$tT] %4$.1s %3$s %5$s %n

#File logging
java.util.logging.FileHandler.pattern=ConcurrentTCK%g%u.log
java.util.logging.FileHandler.limit = 500000
java.util.logging.FileHandler.count = 5
java.util.logging.FileHandler.formatter=java.util.logging.SimpleFormatter
java.util.logging.FileHandler.level=CONFIG

# Console Logging
java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
java.util.logging.ConsoleHandler.level=WARNING
40 changes: 40 additions & 0 deletions appserver/tests/tck/concurrency/suite.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<!--
/*
* Copyright (c) 2022 Contributors to the Eclipse Foundation
*
* 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
*/
-->
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >

<suite name="jakarta-concurrency" verbose="2" configfailurepolicy="continue">
<listeners>
<!-- Required - avoid randomly mixed test method execution -->
<listener class-name="org.jboss.cdi.tck.impl.testng.SingleTestClassMethodInterceptor" />
<!-- Optional - intended for debug purpose only -->
<listener class-name="org.jboss.cdi.tck.impl.testng.ProgressLoggingTestListener"/>
<!-- Optional - it's recommended to disable the default JUnit XML reporter -->
<listener class-name="org.testng.reporters.SuiteHTMLReporter"/>
<listener class-name="org.testng.reporters.FailedReporter"/>
<listener class-name="org.testng.reporters.XMLReporter"/>
<listener class-name="org.testng.reporters.EmailableReporter"/>
<listener class-name="org.testng.reporters.TestHTMLReporter" />
</listeners>

<test name="jakarta-concurrency.tck">
<packages>
<package name="ee.jakarta.tck.concurrent.api.*"/>
<package name="ee.jakarta.tck.concurrent.spec.*"/>
</packages>
</test>
</suite>
1 change: 1 addition & 0 deletions appserver/tests/tck/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
<module>authentication</module>
<module>authorization</module>
<module>cdi</module>
<module>concurrency</module>
</modules>

<build>
Expand Down