-
Notifications
You must be signed in to change notification settings - Fork 305
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
Bug Report: Payara Embedded All fail to test with JUnit5, Maven Failsafe Plugin and Arquillian. #5224
Comments
You are adding a |
Please correct me If I'm wrong and bear with me. I'm understanding as the following: -
As of now I do not understand why I've to remove Could you please help to explain? |
Hi @charleech Kindly remove nested `
|
The example output if the
|
Is there a particular reason you want to run with embedded? Why don't you run with remote or managed? |
I've been doing QA for Payara for about 6 months now and I've never run embedded :) |
Hi @shub8968, I understand that your recommended is to remove that Do you mean that I have to not execute? |
Hi @lprimak, I would like to use the embedded since there is no need to install any addition to the development machine, just point the dependency in the pom file to that embedded. Especially I do not want to take care any configuration, e.g. domain.xml, logging.proerties and so on. Le'ts tweak the |
See https://github.com/payara/MicroProfile-TCK-Runners/blob/0317081714c0ed6f2df91c72b790f885f406204a/pom.xml#L135 for an example of how to use managed profile. We don't regularly test embedded (at least for now) so unless you want to debug this yourself I would suggest using managed / remote profiles |
Hi @shub8968, At the moment my <build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${my.maven.surefire.version}</version>
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${my.junit5.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>unit-test</id>
<goals>
<goal>test</goal>
</goals>
<configuration>
<encoding>${project.build.sourceEncoding}</encoding>
<skipTests>${my.skipUTs}</skipTests>
<includes>
<include>
**/*TestSuite*.java
</include>
</includes>
<excludes>
<exclude>
**/*IntgrtnTestSuite*.java
</exclude>
</excludes>
<excludedGroups>
${my.integration.test.category}
</excludedGroups>
<additionalClasspathElements>
<additionalClasspathElement>
${basedir}/src/test/java
</additionalClasspathElement>
</additionalClasspathElements>
<argLine>${my.maven.surefire.jvm.memory}
${my.maven.surefire.java.endorsed.dir}</argLine>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${my.maven.failsafe.version}</version>
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${my.junit5.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>integration-test</id>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
<configuration>
<encoding>${project.build.sourceEncoding}</encoding>
<skipTests>${my.skipTests}</skipTests>
<skipITs>${my.skipITs}</skipITs>
<includes>
<include>
**/*IntgrtnTestSuite*.java
</include>
</includes>
<groups>
${my.integration.test.category}
</groups>
<additionalClasspathElements>
<additionalClasspathElement>
${basedir}/src/test/java
</additionalClasspathElement>
</additionalClasspathElements>
<argLine>${my.maven.surefire.jvm.memory}
${my.maven.surefire.java.endorsed.dir}</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
</plugin>
</plugins>
</build> After executing the
Could you please help to confirm that this is a solution for this issue? |
Thank you very much for the useful resource. I will try to learn about the managed and remote from it. |
Hi @charleech , @lprimak is right, you can easily configure the managed connector together with the dependency plugin to install a specific version of Payara Server, run it and then clean it up after tests are executed. So everything can be automated in pom.xml, no need to install anything manually. Payara Embedded has some weird issues when you use it in a maven build because of classpath conflicts. I think that some libraries used by Maven or its plugins collide with libraries in Payara Embedded. You at least need to run the failsafe tests in a separate JVM with fork=true but even then I'm not sure that all works with Payara Embedded. |
I also have a chance to follow @lprimak guidance and apply to my reproducer as charleech/arquillian-junit5-payara#17 It works like a charm. (As @OndroMih mentions that if it is executed in the different JVM there should not be any Please bear with me. I am stuck with the On the other hand , I totally agree with both of you that I should switch to Firstly I open this issue because I hope that the engineering team may have some spare time and may be interested, but at the moment it may be my fault and this issue also may be invalid. Please accept my sincere apologies. I thank you from the bottom of my heart that you spend the time and effort on this issue, especially to guide me to the proper direction. |
@charleech that's not a problem at all. I will close this issue as we definitely do not have time to debug this |
Description
I've tried to migrate my test to
JUnit 5
and found that during performing the integration test viaPayara Embedded All
,Maven Failsafe Plugin
andArquillian
, all tests are failed.Anyhow and surprisingly when testing against the
Payara Micro
all tests are passed !Expected Outcome
All tests should be passed.
Current Outcome
All tests are failed.
The only suspected is the log message during starting up the
Payara Embedded All
as the following: -Steps to reproduce
I've created the reproducer at https://github.com/charleech/arquillian-junit5-payara
There are two maven module as
arquillian-junit5-payara/my-cdi-junit4
andarquillian-junit5-payara/my-cdi-junit5
which are the simple CDI testing (hello world style) by usingJUnit4
andJUnit5
respectively.The
arquillian-junit5-payara/my-cdi-junit5
is the failure one.Payara Embedded All
mvn clean install -Dpayara-embedded=true
Payara Micro
mvn clean install -Dpayara-micro=true
Environment
5.2021.3
3.8.1
org.apache.maven.plugins:maven-failsafe-plugin:3.0.0-M5
fish.payara.extras:payara-embedded-all:5.2021.3
fish.payara.extras:payara-micro:5.2021.3
fish.payara.arquillian:arquillian-payara-server-embedded:2.4.1
fish.payara.arquillian:arquillian-payara-micro-managed:2.4.1
junit:junit:4.13.2
org.junit.jupiter:junit-jupiter-api:5.8.0-M1
org.junit.jupiter:junit-jupiter-engine:5.8.0-M1
org.junit.jupiter:junit-vintage-engine:5.8.0-M1
org.junit.platform:junit-platform-runner:1.8.0-M1
org.jboss.arquillian.junit5:arquillian-junit5-container:1.7.0.Alpha9
org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-impl-maven:3.1.4
org.jboss.shrinkwrap.descriptors:shrinkwrap-descriptors-impl-javaee:2.0.0
org.eu.ingwar.tools:arquillian-suite-extension:1.2.2
The text was updated successfully, but these errors were encountered: