Skip to content

Commit d4edd01

Browse files
authored
Merge pull request wildfly#19290 from bstansberry/WFLY-20694
[WFLY-20694] Add a smoke test of Jakarta Data that also covers ear an…
2 parents 44371d7 + 987d829 commit d4edd01

23 files changed

+1340
-0
lines changed

testsuite/integration/smoke/pom.xml

Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,12 @@
146146
<scope>test</scope>
147147
</dependency>
148148

149+
<dependency>
150+
<groupId>jakarta.data</groupId>
151+
<artifactId>jakarta.data-api</artifactId>
152+
<scope>test</scope>
153+
</dependency>
154+
149155
<dependency>
150156
<groupId>jakarta.ejb</groupId>
151157
<artifactId>jakarta.ejb-api</artifactId>
@@ -170,6 +176,18 @@
170176
<scope>test</scope>
171177
</dependency>
172178

179+
<dependency>
180+
<groupId>jakarta.json</groupId>
181+
<artifactId>jakarta.json-api</artifactId>
182+
<scope>test</scope>
183+
</dependency>
184+
185+
<dependency>
186+
<groupId>jakarta.json.bind</groupId>
187+
<artifactId>jakarta.json.bind-api</artifactId>
188+
<scope>test</scope>
189+
</dependency>
190+
173191
<dependency>
174192
<groupId>jakarta.resource</groupId>
175193
<artifactId>jakarta.resource-api</artifactId>
@@ -320,6 +338,12 @@
320338
<scope>test</scope>
321339
</dependency>
322340

341+
<dependency>
342+
<groupId>org.hibernate.orm</groupId>
343+
<artifactId>hibernate-core</artifactId>
344+
<scope>test</scope>
345+
</dependency>
346+
323347
<dependency>
324348
<groupId>org.jboss.arquillian.junit5</groupId>
325349
<artifactId>arquillian-junit5-container</artifactId>
@@ -356,6 +380,12 @@
356380
<scope>test</scope>
357381
</dependency>
358382

383+
<dependency>
384+
<groupId>org.jboss.resteasy</groupId>
385+
<artifactId>resteasy-client</artifactId>
386+
<scope>test</scope>
387+
</dependency>
388+
359389
<dependency>
360390
<groupId>org.jboss.spec.jakarta.xml.soap</groupId>
361391
<artifactId>jboss-saaj-api_3.0_spec</artifactId>
@@ -392,6 +422,12 @@
392422
<scope>test</scope>
393423
</dependency>
394424

425+
<dependency>
426+
<groupId>org.wildfly.core</groupId>
427+
<artifactId>wildfly-cli</artifactId>
428+
<scope>test</scope>
429+
</dependency>
430+
395431
<dependency>
396432
<groupId>org.wildfly.core</groupId>
397433
<artifactId>wildfly-core-testsuite-shared</artifactId>
@@ -415,6 +451,25 @@
415451

416452
<pluginManagement>
417453
<plugins>
454+
<plugin>
455+
<groupId>org.apache.maven.plugins</groupId>
456+
<artifactId>maven-compiler-plugin</artifactId>
457+
<configuration>
458+
<annotationProcessorPaths>
459+
<path>
460+
<groupId>org.hibernate.orm</groupId>
461+
<artifactId>hibernate-jpamodelgen</artifactId>
462+
<!-- We declare the version here instead of relying
463+
on dependencyManagement. The testsuite uses the server
464+
build boms for dependency management, not the user boms
465+
like org.wildfly.bom:wildfly-ee that includes this artifact.
466+
Perhaps it should switch; if it does this version config
467+
could be removed. -->
468+
<version>${version.org.hibernate}</version>
469+
</path>
470+
</annotationProcessorPaths>
471+
</configuration>
472+
</plugin>
418473
<plugin>
419474
<groupId>org.apache.maven.plugins</groupId>
420475
<artifactId>maven-surefire-plugin</artifactId>
@@ -458,6 +513,8 @@
458513
<!-- Requires EJB -->
459514
<exclude>org/jboss/as/test/smoke/ejb3/**/*TestCase.java</exclude>
460515
<exclude>org/jboss/as/test/smoke/property/EjbDDWithPropertyTestCase.java</exclude>
516+
<!-- Requires Jakarta Data -->
517+
<exclude>org/jboss/as/test/smoke/jakarta/data/**/*TestCase.java</exclude>
461518
<!-- Requires iiop -->
462519
<exclude>org/jboss/as/test/smoke/socketbindings/SocketBindingBoundPortsTestCase.java</exclude>
463520
<!-- Requires messaging -->
@@ -541,6 +598,17 @@
541598
<surefire-execution-for-included-classes>legacy-sar-layers.surefire</surefire-execution-for-included-classes>
542599
</configuration>
543600
</execution>
601+
<execution>
602+
<id>scan-jakarta-data-layers</id>
603+
<goals>
604+
<goal>scan</goal>
605+
</goals>
606+
<phase>${glow.phase.sar}</phase>
607+
<configuration>
608+
<expected-discovery>[cdi, ee-integration, h2-datasource, jakarta-data, jaxrs, jpa, jsonb, jsonp]==>ee-core-profile-server,h2-datasource,jakarta-data,jaxrs</expected-discovery>
609+
<surefire-execution-for-included-classes>jakarta-data-layers.surefire</surefire-execution-for-included-classes>
610+
</configuration>
611+
</execution>
544612
</executions>
545613
</plugin>
546614
<plugin>
@@ -656,6 +724,11 @@
656724
<name>standalone-microprofile.xml</name>
657725
</config>
658726
</included-configs>
727+
<included-packages>
728+
<!-- Tests will add the jakarta data extension, so provision its packages too -->
729+
<name>org.wildfly.extension.jakarta.data</name>
730+
<name>jakarta.data.api</name>
731+
</included-packages>
659732
</feature-pack>
660733
</feature-packs>
661734
</configuration>
@@ -772,6 +845,35 @@
772845
<provisioning-file>target/glow-scan/legacy-sar-layers.surefire/provisioning.xml</provisioning-file>
773846
</configuration>
774847
</execution>
848+
849+
<!-- Provision a server with jakarta data support -->
850+
<execution>
851+
<id>jakarta-data-provisioning</id>
852+
<goals>
853+
<goal>provision</goal>
854+
</goals>
855+
<!--<phase>process-test-classes</phase>-->
856+
<!--
857+
Glow Arquillian plugin generates a provisioning.xml that doesn't
858+
provision preview stability artifacts, so this doesn't work.
859+
See https://github.com/wildfly/wildfly-glow/issues/134
860+
Leave all the config here to ease promotion to community stability.
861+
-->
862+
<phase>none</phase>
863+
<configuration>
864+
<provisioning-dir>${project.build.directory}/wildfly-jakarta-data</provisioning-dir>
865+
<record-provisioning-state>false</record-provisioning-state>
866+
<log-provisioning-time>${galleon.log.time}</log-provisioning-time>
867+
<offline-provisioning>${galleon.offline}</offline-provisioning>
868+
<galleon-options>
869+
<jboss-maven-dist/>
870+
<jboss-fork-embedded>${galleon.fork.embedded}</jboss-fork-embedded>
871+
<optional-packages>passive+</optional-packages>
872+
<stability-level>preview</stability-level>
873+
</galleon-options>
874+
<provisioning-file>target/glow-scan/jakarta-data-layers.surefire/provisioning.xml</provisioning-file>
875+
</configuration>
876+
</execution>
775877
</executions>
776878
</plugin>
777879

@@ -828,6 +930,40 @@
828930
</configuration>
829931
</execution>
830932

933+
<!-- Tests against the install with jakarta data support -->
934+
<execution>
935+
<id>jakarta-data-layers.surefire</id>
936+
<!--<phase>test</phase>-->
937+
<!--
938+
Glow Arquillian plugin generates a provisioning.xml that doesn't
939+
provision preview stability artifacts, so this doesn't work.
940+
See https://github.com/wildfly/wildfly-glow/issues/134
941+
Leave all the config here to ease promotion to community stability.
942+
-->
943+
<phase>none</phase>
944+
<goals>
945+
<goal>test</goal>
946+
</goals>
947+
<configuration>
948+
<systemPropertyVariables>
949+
<jboss.home>${project.build.directory}/wildfly-jakarta-data</jboss.home>
950+
<jboss.home.dir>${project.build.directory}/wildfly-jakarta-data</jboss.home.dir>
951+
<jbossas.dist>${project.build.directory}/wildfly-jakarta-data</jbossas.dist>
952+
<jboss.dist>${project.build.directory}/wildfly-jakarta-data</jboss.dist>
953+
<jboss.install.dir>${basedir}/target/wildfly-jakarta-data</jboss.install.dir>
954+
<!-- Override the standard module path that points at the shared module set from dist -->
955+
<module.path>${project.build.directory}/wildfly-jakarta-data/modules${path.separator}${basedir}/target/modules</module.path>
956+
<jboss.server.config.file.name>standalone.xml</jboss.server.config.file.name>
957+
</systemPropertyVariables>
958+
<environmentVariables>
959+
<JBOSS_HOME>${project.build.directory}/wildfly-jakarta-data</JBOSS_HOME>
960+
</environmentVariables>
961+
<includes>
962+
<include>org/jboss/as/test/smoke/jakarta/data/**/*TestCase.java</include>
963+
</includes>
964+
</configuration>
965+
</execution>
966+
831967
</executions>
832968
</plugin>
833969
</plugins>
@@ -941,6 +1077,22 @@
9411077
</properties>
9421078
<build>
9431079
<plugins>
1080+
<plugin>
1081+
<groupId>org.apache.maven.plugins</groupId>
1082+
<artifactId>maven-compiler-plugin</artifactId>
1083+
<executions>
1084+
<execution>
1085+
<id>default-testCompile</id>
1086+
<configuration>
1087+
<testExcludes>
1088+
<!-- The classes generated with the standard WF hibernate-jpamodelgen
1089+
won't run with WFP's ORM version -->
1090+
<exclude>org/jboss/as/test/smoke/jakarta/data/**</exclude>
1091+
</testExcludes>
1092+
</configuration>
1093+
</execution>
1094+
</executions>
1095+
</plugin>
9441096
<!-- Disable the standard copy-based provisioning -->
9451097
<plugin>
9461098
<groupId>org.apache.maven.plugins</groupId>
@@ -1018,6 +1170,22 @@
10181170
</activation>
10191171
<build>
10201172
<plugins>
1173+
<plugin>
1174+
<groupId>org.apache.maven.plugins</groupId>
1175+
<artifactId>maven-compiler-plugin</artifactId>
1176+
<executions>
1177+
<execution>
1178+
<id>default-testCompile</id>
1179+
<configuration>
1180+
<testExcludes>
1181+
<!-- The classes generated with the standard WF hibernate-jpamodelgen
1182+
won't run with WFP's ORM version -->
1183+
<exclude>org/jboss/as/test/smoke/jakarta/data/**</exclude>
1184+
</testExcludes>
1185+
</configuration>
1186+
</execution>
1187+
</executions>
1188+
</plugin>
10211189
<plugin>
10221190
<groupId>org.apache.maven.plugins</groupId>
10231191
<artifactId>maven-surefire-plugin</artifactId>

0 commit comments

Comments
 (0)