-
Notifications
You must be signed in to change notification settings - Fork 604
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Concurrency TCK test suite to service release 3.0.2 (#21907)
* WIP - updates for new concurrency tck * ensure seperate files * switch over to published artifacts * update documentation and TODOs * feedback changes - comments only * merge conflicts
- Loading branch information
Showing
20 changed files
with
551 additions
and
230 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
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
212 changes: 0 additions & 212 deletions
212
...t_tck/fat/src/io/openliberty/jakarta/enterprise/concurrent/tck/ConcurrentTckLauncher.java
This file was deleted.
Oops, something went wrong.
121 changes: 121 additions & 0 deletions
121
...k/fat/src/io/openliberty/jakarta/enterprise/concurrent/tck/ConcurrentTckLauncherFull.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,121 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2022 IBM Corporation and others. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* IBM Corporation - initial API and implementation | ||
*******************************************************************************/ | ||
package io.openliberty.jakarta.enterprise.concurrent.tck; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
import java.util.Collections; | ||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
import org.junit.AfterClass; | ||
import org.junit.BeforeClass; | ||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
|
||
import com.ibm.websphere.simplicity.PortType; | ||
|
||
import componenttest.annotation.AllowedFFDC; | ||
import componenttest.annotation.MinimumJavaLevel; | ||
import componenttest.annotation.Server; | ||
import componenttest.custom.junit.runner.FATRunner; | ||
import componenttest.topology.impl.LibertyServer; | ||
import componenttest.topology.utils.MvnUtils; | ||
|
||
/** | ||
* This is a test class that runs the entire Jakarta Concurrency TCK against Full Profile. | ||
* | ||
* The TCK results are copied in the results/junit directory before the Simplicity FAT framework | ||
* generates the html report - so there is detailed information on individual | ||
* tests as if they were running as simplicity junit FAT tests in the standard location. | ||
*/ | ||
@RunWith(FATRunner.class) | ||
@MinimumJavaLevel(javaLevel = 11) | ||
public class ConcurrentTckLauncherFull { | ||
|
||
final static Map<String, String> additionalProps = new HashMap<>(); | ||
|
||
private static String suiteXmlFile = "tck-suite-full.xml"; //Default value | ||
|
||
@Server("ConcurrentTCKFullServer") | ||
public static LibertyServer server; | ||
|
||
@BeforeClass | ||
public static void setUp() throws Exception { | ||
//UNCOMMENT - To test against a local snapshot of TCK | ||
// additionalProps.put("jakarta.concurrent.tck.groupid", "jakarta.enterprise.concurrent"); | ||
// additionalProps.put("jakarta.concurrent.tck.version", "3.0.2-SNAPSHOT"); | ||
|
||
//username and password for Arquillian to authenticate to restConnect | ||
additionalProps.put("tck_username", "arquillian"); | ||
additionalProps.put("tck_password", "arquillianPassword"); | ||
|
||
//Logging properties for java.util.logging to use for mvn output | ||
additionalProps.put("java.util.logging.config.file", server.getServerRoot() + "/resources/logging/logging.properties"); | ||
|
||
//username and password to set on quickStartSecurity | ||
server.addEnvVar("tck_username", "arquillian"); | ||
server.addEnvVar("tck_password", "arquillianPassword"); | ||
|
||
//Ports liberty should be using for testing | ||
server.addEnvVar("tck_port", "" + server.getPort(PortType.WC_defaulthost)); | ||
server.addEnvVar("tck_port_secure", "" + server.getPort(PortType.WC_defaulthost_secure)); | ||
|
||
Map<String, String> opts = server.getJvmOptionsAsMap(); | ||
//Path that jimage will output modules for signature testing | ||
opts.put("-Djimage.dir", server.getServerSharedPath() + "jimage/output/"); | ||
server.setJvmOptions(opts); | ||
|
||
//Finally start the server | ||
server.startServer(); | ||
} | ||
|
||
@AfterClass | ||
public static void tearDown() throws Exception { | ||
server.stopServer( | ||
"WLTC0032W", //Transaction rollback warning. | ||
"WLTC0033W", //Transaction rollback warning. | ||
"CWWKS0901E" //Quickstart security | ||
); | ||
} | ||
|
||
/** | ||
* Run the TCK (controlled by autoFVT/publish/tckRunner/tck/*) | ||
*/ | ||
@Test | ||
@AllowedFFDC // The tested exceptions cause FFDC so we have to allow for this. | ||
public void launchConcurrentTCK() throws Exception { | ||
|
||
suiteXmlFile = FATSuite.createSuiteXML(FATSuite.PROFILE.FULL); | ||
|
||
Map<String, String> resultInfo = MvnUtils.getResultInfo(server); | ||
|
||
/** | ||
* The runTCKMvnCmd will set the following properties for use by arquillian | ||
* [ wlp, tck_server, tck_port, tck_failSafeUndeployment, tck_appDeployTimeout, tck_appUndeployTimeout ] | ||
* and then run the mvn test command. | ||
*/ | ||
int result = MvnUtils.runTCKMvnCmd( | ||
server, //server to run on | ||
"io.openliberty.jakarta.concurrency.3.0_fat_tck", //bucket name | ||
this.getClass() + ":launchConcurrentTCK", //launching method | ||
suiteXmlFile, //tck suite | ||
additionalProps, //additional props | ||
Collections.emptySet() //additional jars | ||
); | ||
|
||
resultInfo.put("results_type", "Jakarta"); | ||
resultInfo.put("feature_name", "Concurrency"); | ||
resultInfo.put("feature_version", "3.0-full"); | ||
MvnUtils.preparePublicationFile(resultInfo); | ||
assertEquals(0, result); | ||
} | ||
} |
Oops, something went wrong.