This is an automated email from the ASF dual-hosted git repository. jlmonteiro pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomee.git
commit c8d64e845e8c30cba5fcfc5c7cdc6b39d3d79f55 Author: Jean-Louis Monteiro <[email protected]> AuthorDate: Wed Oct 12 14:35:07 2022 +0200 Testing parallelism on the CI --- tck/microprofile-tck/metrics/pom.xml | 11 +++++++++-- .../tck/metrics/MicroProfileMetricsTCKObserver.java | 7 +++++++ .../metrics/src/test/resources/arquillian.xml | 12 +++--------- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/tck/microprofile-tck/metrics/pom.xml b/tck/microprofile-tck/metrics/pom.xml index 2275074c60..7041f9a78c 100644 --- a/tck/microprofile-tck/metrics/pom.xml +++ b/tck/microprofile-tck/metrics/pom.xml @@ -35,7 +35,8 @@ <artifactId>maven-surefire-plugin</artifactId> <version>3.0.0-M6</version> <configuration> - <reuseForks>false</reuseForks> + <reuseForks>true</reuseForks> + <forkCount>1C</forkCount> <dependenciesToScan> <dependency>org.eclipse.microprofile.metrics:microprofile-metrics-api-tck</dependency> <dependency>org.eclipse.microprofile.metrics:microprofile-metrics-rest-tck</dependency> @@ -44,7 +45,7 @@ <MP_METRICS_TAGS>tier=integration</MP_METRICS_TAGS> </environmentVariables> <systemPropertyVariables> - <test.url>http://localhost:50290</test.url> + <java.io.tmpdir>./target</java.io.tmpdir> </systemPropertyVariables> </configuration> </plugin> @@ -66,8 +67,11 @@ <goal>test</goal> </goals> <configuration> + <reuseForks>true</reuseForks> + <forkCount>1C</forkCount> <systemPropertyVariables> <arquillian.launch>tomee-plus</arquillian.launch> + <java.io.tmpdir>./target</java.io.tmpdir> </systemPropertyVariables> </configuration> </execution> @@ -77,8 +81,11 @@ <goal>test</goal> </goals> <configuration> + <reuseForks>true</reuseForks> + <forkCount>1C</forkCount> <systemPropertyVariables> <arquillian.launch>tomee-plume</arquillian.launch> + <java.io.tmpdir>./target</java.io.tmpdir> </systemPropertyVariables> </configuration> </execution> diff --git a/tck/microprofile-tck/metrics/src/test/java/org/apache/tomee/microprofile/tck/metrics/MicroProfileMetricsTCKObserver.java b/tck/microprofile-tck/metrics/src/test/java/org/apache/tomee/microprofile/tck/metrics/MicroProfileMetricsTCKObserver.java index 71c57c8b7e..7fdab048db 100644 --- a/tck/microprofile-tck/metrics/src/test/java/org/apache/tomee/microprofile/tck/metrics/MicroProfileMetricsTCKObserver.java +++ b/tck/microprofile-tck/metrics/src/test/java/org/apache/tomee/microprofile/tck/metrics/MicroProfileMetricsTCKObserver.java @@ -17,6 +17,7 @@ package org.apache.tomee.microprofile.tck.metrics; import io.restassured.RestAssured; +import org.apache.openejb.arquillian.common.TomEEContainer; import org.jboss.arquillian.container.spi.event.container.AfterDeploy; import org.jboss.arquillian.core.api.annotation.Observes; @@ -25,7 +26,13 @@ import org.jboss.arquillian.core.api.annotation.Observes; * so the test archives are not required to be deployed in the / context root. */ public class MicroProfileMetricsTCKObserver { + + + public void AfterDeploy(@Observes final AfterDeploy afterDeploy) { + final int httpPort = ((TomEEContainer<?>) afterDeploy.getDeployableContainer()).getConfiguration().getHttpPort(); + final String targetUrl = "http://localhost:" + httpPort; + System.setProperty("test.url", targetUrl); RestAssured.basePath = "microprofile-metrics"; } } diff --git a/tck/microprofile-tck/metrics/src/test/resources/arquillian.xml b/tck/microprofile-tck/metrics/src/test/resources/arquillian.xml index 8408d7432f..fa18113a9f 100644 --- a/tck/microprofile-tck/metrics/src/test/resources/arquillian.xml +++ b/tck/microprofile-tck/metrics/src/test/resources/arquillian.xml @@ -23,14 +23,12 @@ http://jboss.org/schema/arquillian/arquillian_1_0.xsd"> <container qualifier="tomee-microprofile" default="true"> <configuration> - <property name="httpPort">50290</property> + <property name="httpPort">-1</property> <property name="ajpPort">-1</property> <property name="stopPort">-1</property> <property name="classifier">microprofile</property> <property name="debug">false</property> <property name="conf">src/test/conf</property> - <property name="dir">target/tomee</property> - <property name="appWorkingDir">target/workdir</property> <property name="cleanOnStartUp">true</property> <property name="properties"> MP_METRICS_TAGS = tier=integration @@ -39,14 +37,12 @@ </container> <container qualifier="tomee-plus"> <configuration> - <property name="httpPort">50290</property> + <property name="httpPort">-1</property> <property name="ajpPort">-1</property> <property name="stopPort">-1</property> <property name="classifier">plus</property> <property name="conf">src/test/conf</property> <property name="dir">target/tomee</property> - <property name="appWorkingDir">target/workdir</property> - <property name="cleanOnStartUp">true</property> <property name="properties"> tomee.mp.scan = all MP_METRICS_TAGS = tier=integration @@ -55,13 +51,11 @@ </container> <container qualifier="tomee-plume"> <configuration> - <property name="httpPort">50290</property> + <property name="httpPort">-1</property> <property name="ajpPort">-1</property> <property name="stopPort">-1</property> <property name="classifier">plume</property> <property name="conf">src/test/conf</property> - <property name="dir">target/tomee</property> - <property name="appWorkingDir">target/workdir</property> <property name="cleanOnStartUp">true</property> <property name="properties"> tomee.mp.scan = all
