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

Initial update to remove the web integration tests from the core tck #532

Merged
merged 7 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ or when compiling against staged Jakarta artifacts:
`mvn -Pstaging install`

## Building the CDI TCK distribution
The CDI TCK distribution artifact is built by specifing an additional `-Drelease` property to build the TCK reference
The CDI TCK distribution artifact is built by specifying an additional `-Drelease` property to build the TCK reference
documentation and distribution bundle, e.g.:

`mvn -Drelease install`
Expand All @@ -24,7 +24,7 @@ The https://github.com/jakartaee/cdi/wiki/Eclipse-CI-Release-Jobs page describes

## Sources in GIT

Master branch contains the CDI TCK 4.0
Master branch contains the CDI TCK 4.1

### Source Layout

Expand All @@ -37,5 +37,4 @@ Master branch contains the CDI TCK 4.0
* ide-configs - useful settings for Eclipse and Intellij IDEs
* impl - The core set of tests, excluding those that depend on web and full platform containers
* lang-model - A standalone test suite for the CDI language model; see its [README](./lang-model/README.adoc)
* web - The extra tests that depend on the web profile and full platform
* README.md - this doc
8 changes: 3 additions & 5 deletions dist-build/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ porting-package-lib/

== Software Requirements

* A Java SE 11 runtime
* A Java SE 17 runtime
* Maven 3.6.x +

== Installation
Expand Down Expand Up @@ -72,8 +72,6 @@ Run the tests:

* Run embedded container tests:
`mvn clean verify -f jboss-tck-runner/pom.xml`
* Run incontainer, full EE set [1800+ tests]
`mvn clean verify -Dincontainer -f jboss-tck-runner/pom.xml`
* Run SE tests [30+ tests]
`mvn clean verify -Dincontainer=se -f jboss-tck-runner/pom.xml`

Expand All @@ -85,11 +83,11 @@ Then:

* `mvn install -f $CDI_TCK_ROOT/artifacts/pom.xml`
* `mvn -Dtck package -f $CDI_TCK_ROOT/weld/jboss-as/pom.xml` - to enable CDI Extension
* `mvn clean verify -Dincontainer -Dcdi.tck-4-0.version=${TCK_VERSION} -f $CDI_TCK_ROOT/weld/lang-model-tck-runner/pom.xml`` - to run the TCK against WildFly
* `mvn clean verify -Dincontainer -Dcdi.tck.version=${TCK_VERSION} -f $CDI_TCK_ROOT/weld/lang-model-tck-runner/pom.xml`` - to run the TCK against WildFly
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cdi.tck-4.0.version property is for Weld, right? At the moment, Weld uses cdi.tck-4-1.version (and I don't see a PR in https://github.com/weld/core to change it), so this change (here and elsewhere) is wrong.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, there is a separate weld.version for that. How this cdi.tck-4-0.version property was used was to allow one to select a different version of the TCK when running the sample test runner poms. Really this dates back to when one could do minor releases of the TCK without doing a full release, so I just dropped it as it is confusing as to what the purpose is and it just complicates the build and verifying it.

Copy link
Contributor

@manovotn manovotn Feb 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think Ladislav is right here. This command is taken from Weld to execute TCKs against certain TCK version and the property is defined in Weld here as cdi.tck-4-1.version

The reason it's so explicit is that in some point in time Weld had to run against two different TCK majors (around CDI 2/3 IIRC). That being said, I wouldn't mind changing it to cdi.tck.version if that's what you'd prefer.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, that is confusing. Let me look at exactly Weld uses it and how this fits into how the TCK is released now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't see why we would want to take the CDI TCK version used by the sample TCK runner from the weld-core-parent pom cdi.tck-4-1.version value. What is missing in the current changes is a default value for the cdi.tck.version and not using filtering on this property when the jboss-runner.pom is copied to the dist weld/jboss-tck-runner/pom.xml file so that one can override the CDI TCK version used. We can talk about it in today's call.

  <properties>
    <!-- This matches the htmlunit version in TCK -->
    <htmlunit.version>2.50.0</htmlunit.version>
    <cdi.tck.version>${project.version}</cdi.tck.version>
  </properties>


Alternatively, run against Weld in plane Java SE:

* `mvn clean verify -Dcdi.tck-4-0.version=${TCK_VERSION} -f $CDI_TCK_ROOT/weld/lang-model-tck-runner/pom.xml`
* `mvn clean verify -Dcdi.tck.version=${TCK_VERSION} -f $CDI_TCK_ROOT/weld/lang-model-tck-runner/pom.xml`

== Where to file challenges

Expand Down
32 changes: 0 additions & 32 deletions dist-build/artifact-install.pom
Original file line number Diff line number Diff line change
Expand Up @@ -109,38 +109,6 @@
</configuration>
</execution>

<execution>
<id>install-cdi-tck-web-impl</id>
<phase>package</phase>
<goals>
<goal>install-file</goal>
</goals>
<configuration>
<groupId>jakarta.enterprise</groupId>
<artifactId>cdi-tck-web-impl</artifactId>
<version>${project.version}</version>
<packaging>jar</packaging>
<file>cdi-tck-web-impl-${project.version}.jar</file>
<generatePom>true</generatePom>
</configuration>
</execution>
<execution>
<id>install-cdi-web-tck-suite</id>
<phase>package</phase>
<goals>
<goal>install-file</goal>
</goals>
<configuration>
<groupId>jakarta.enterprise</groupId>
<artifactId>cdi-tck-web-impl</artifactId>
<version>${project.version}</version>
<packaging>xml</packaging>
<classifier>suite</classifier>
<file>cdi-tck-web-impl-${project.version}-suite.xml</file>
<generatePom>false</generatePom>
</configuration>
</execution>

<execution>
<id>install-cdi-tck-lang-model</id>
<phase>package</phase>
Expand Down
232 changes: 4 additions & 228 deletions dist-build/jboss-runner.pom
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
<dependency>
<groupId>jakarta.enterprise</groupId>
<artifactId>cdi-tck-api</artifactId>
<version>${cdi.tck-4-0.version}</version>
<version>${cdi.tck.version}</version>
<exclusions>
<exclusion>
<groupId>jakarta.el</groupId>
Expand All @@ -81,7 +81,7 @@
<dependency>
<groupId>jakarta.enterprise</groupId>
<artifactId>cdi-tck-core-impl</artifactId>
<version>${cdi.tck-4-0.version}</version>
<version>${cdi.tck.version}</version>
<type>xml</type>
<classifier>suite</classifier>
<scope>test</scope>
Expand Down Expand Up @@ -112,7 +112,7 @@
<dependency>
<groupId>jakarta.enterprise</groupId>
<artifactId>cdi-tck-core-impl</artifactId>
<version>${cdi.tck-4-0.version}</version>
<version>${cdi.tck.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
Expand Down Expand Up @@ -187,7 +187,6 @@
<!-- https://issues.apache.org/jira/browse/SUREFIRE-569 -->
<dependenciesToScan>
<dependency>jakarta.enterprise:cdi-tck-core-impl</dependency>
<dependency>jakarta.enterprise:cdi-tck-web-impl</dependency>
</dependenciesToScan>
</configuration>
</plugin>
Expand Down Expand Up @@ -267,21 +266,12 @@
<artifactItem>
<groupId>jakarta.enterprise</groupId>
<artifactId>cdi-tck-core-impl</artifactId>
<version>${cdi.tck-4-0.version}</version>
<version>${cdi.tck.version}</version>
<type>xml</type>
<classifier>suite</classifier>
<overWrite>false</overWrite>
<destFileName>tck-core-suite.xml</destFileName>
</artifactItem>
<artifactItem>
<groupId>jakarta.enterprise</groupId>
<artifactId>cdi-tck-web-impl</artifactId>
<version>${cdi.tck-4-0.version}</version>
<type>xml</type>
<classifier>suite</classifier>
<overWrite>false</overWrite>
<destFileName>tck-web-suite.xml</destFileName>
</artifactItem>
</artifactItems>
<outputDirectory>target/suites</outputDirectory>
<overWriteReleases>false</overWriteReleases>
Expand Down Expand Up @@ -364,205 +354,6 @@
</build>
</profile>

<!-- Run the TCK in the managed container (full Java EE platform) -->
<profile>
<id>incontainer</id>
<activation>
<activeByDefault>false</activeByDefault>
<property>
<name>incontainer</name>
<value>true</value>
</property>
</activation>
<properties>
<excluded.groups>se</excluded.groups>
</properties>
<dependencies>
<dependency>
<groupId>jakarta.enterprise</groupId>
<artifactId>cdi-tck-web-impl</artifactId>
<version>${cdi.tck-4-0.version}</version>
<type>xml</type>
<classifier>suite</classifier>
<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>
<exclusion>
<groupId>org.jboss.test-audit</groupId>
<artifactId>jboss-test-audit-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.test-audit</groupId>
<artifactId>jboss-test-audit-impl</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>jakarta.enterprise</groupId>
<artifactId>cdi-tck-web-impl</artifactId>
<version>${cdi.tck-4-0.version}</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>
<dependency>
<groupId>org.wildfly.arquillian</groupId>
<artifactId>wildfly-arquillian-container-managed</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.jboss.arquillian.core</groupId>
<artifactId>arquillian-core-spi</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.arquillian.core</groupId>
<artifactId>arquillian-core-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.logmanager</groupId>
<artifactId>log4j-jboss-logmanager</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.protocol</groupId>
<artifactId>arquillian-protocol-servlet-jakarta</artifactId>
<version>${arquillian.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>src/test/resources</directory>
</resource>
<resource>
<directory>src/test/wildfly8</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce-jboss-home-is-set</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireEnvironmentVariable>
<variableName>JBOSS_HOME</variableName>
<message>Environment variable "JBOSS_HOME" must be set in order to execute in-container tests. Please configure it so that it points to your WildFly installation.</message>
</requireEnvironmentVariable>
</rules>
<fail>true</fail>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-resources</id>
<!-- perform this any time before the tests are executed -->
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${JBOSS_HOME}/standalone/configuration</outputDirectory>
<resources>
<resource>
<directory>${JBOSS_HOME}/docs/examples/configs</directory>
<includes>standalone-activemq-embedded.xml</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire.version}</version>
<configuration>
<excludedGroups>${excluded.groups}</excludedGroups>

<argLine>
--add-exports=java.desktop/sun.awt=ALL-UNNAMED
--add-opens=java.base/java.io=ALL-UNNAMED
--add-opens=java.base/java.lang=ALL-UNNAMED
--add-opens=java.base/java.lang.invoke=ALL-UNNAMED
--add-opens=java.base/java.security=ALL-UNNAMED
--add-opens=java.base/java.util=ALL-UNNAMED
--add-opens=java.management/javax.management=ALL-UNNAMED
--add-opens=java.naming/javax.naming=ALL-UNNAMED
</argLine>
<properties>
<property>
<!-- Note a 7.4.0 issue results in NPEs and useless output if you go higher than 1 here -->
<name>surefire.testng.verbose</name>
<value>0</value>
</property>
</properties>
<systemPropertyVariables>
<!-- Silencing the broken code in getActiveConfiguration(),
see https://github.com/arquillian/arquillian/blob/master/impl-base/src/main/java/org/jboss/arquillian/impl/client/container/ContainerRegistryCreator.java -->
<arquillian.launch>wildfly-23</arquillian.launch>
<!-- Specified system properties are not
available during in-container test execution -->
<org.jboss.cdi.tck.libraryDirectory>target/dependency/lib</org.jboss.cdi.tck.libraryDirectory>
<org.jboss.cdi.tck.testDataSource>java:jboss/datasources/ExampleDS</org.jboss.cdi.tck.testDataSource>
</systemPropertyVariables>
<systemProperties>
<jacoco.agent>${jacoco.agent}</jacoco.agent>
<!-- Specifiy any garbage collection related args here -->
<gc.args />
<!-- This property propagates to the javaVmArguments in arquillian.xml -->
<additional.vm.args>
${surefire.plugin.jdk17.args}
</additional.vm.args>
</systemProperties>
<suiteXmlFiles>
<suiteXmlFile>target/suites/tck-web-suite.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</plugin>
</plugins>
</build>
</profile>

<profile>
<id>weld-se</id>
Expand Down Expand Up @@ -636,21 +427,6 @@
</build>
</profile>

<!-- Run only web profile tests -->
<profile>
<id>webprofile</id>
<activation>
<activeByDefault>false</activeByDefault>
<property>
<name>webprofile</name>
<value>true</value>
</property>
</activation>
<properties>
<excluded.groups>javaee-full,se</excluded.groups>
</properties>
</profile>

</profiles>

</project>
Loading