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: The Arquiliian test with Payara Embedded All failed/FISH-7730 #6347
Comments
Surprisingly, it works fine with JDK 11 ! JDKopenjdk version "11.0.20" 2023-07-18 parent pom.xml<my.java.version>11</my.java.version>
<maven.compiler.release>${my.java.version}</maven.compiler.release>
<maven.compiler.source>${my.java.version}</maven.compiler.source>
<maven.compiler.target>${my.java.version}</maven.compiler.target> First trialThere is a failure as the following: -
Second trialexport JAVA_TOOL_OPTIONS=--add-opens=java.base/jdk.internal.loader=ALL-UNNAMED The build is success ! |
After searching through the internet with trial and error, I'm able to make it works with export JAVA_TOOL_OPTIONS="-Djdk.util.zip.disableZip64ExtraFieldValidation=true \
-Djdk.attach.allowAttachSelf=true \
--add-opens=java.base/java.io=ALL-UNNAMED \
--add-opens=java.base/sun.net.www.protocol.jar=ALL-UNNAMED \
--add-opens=java.base/java.net=ALL-UNNAMED \
--add-opens=java.naming/javax.naming.spi=ALL-UNNAMED \
--add-opens=java.base/java.lang=ALL-UNNAMED"
mvn clean install -Darq-mode=payara-embedded -am |
Even the test is success, the stopping process is too slow. It takes around 2+ minutes. I also have a chance to dig deeper and found that the slowness is from the method named @Override
public void undeploy(Archive<?> archive) throws DeploymentException {
try {
glassfish.getDeployer().undeploy(createDeploymentName(archive.getName())); // <---- This line !
} catch (Exception e) {
throw new DeploymentException("Could not undeploy " + archive.getName(), e);
}
} Again, the slowness only occurs for |
I have a chance to add the failure test case as the following: - @Test
@Order(2)
@DisplayName(
"When greeting as failure by Jakarta EE should be failed."
)
void whenGreetAsFailure() {
String expected = null;
String actual = null;
expected = "Hello JUnit";
actual = this.greeter.greet("UNKNOWN");
BDDAssertions.then(actual).
as("The greeting must be valid.").
isNotNull().
isNotEmpty().
isEqualTo(expected);
} The expected is, there should 1 failure case as the same from [INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR] GreeterIT.whenGreetAsFailure:83 [The greeting must be valid.]
expected: "Hello JUnit"
but was: "Hello UNKNOWN"
[INFO]
[ERROR] Tests run: 2, Failures: 1, Errors: 0, Skipped: 0 but the result from [INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] Furthermore, I also have tried to print debug for both test methods, but there is no any printed on the console. It looks like they are not executed. |
Hello @charleech, I have tested the reproducer according to your instructions, and I can see the issue with the test being shown as passed rather than failed. Just to understand the problem: you are saying that the same tests in Payara Micro give the correct results (one pass one fail), compared to Payara Embedded which passes both of the tests (which I can confirm)? |
Yes, correct. Regarding to the README To test against the
|
Furthermore, testing against the To test against the
|
Greetings, |
Hi @felixif Do you need any information to re-produce ? |
Hello @charleech, No, apologies for the automation that set the issue as abandoned. The reproducer you provided and the instructions are excellent. I was able to confirm that Nevertheless, I have created an internal issue Thank you very much for reporting this bug! Best regards, |
Brief Summary
Cannot test the simple CDI bean with JUnit5, Arquillian, arquillian-payara-server-embedded and payara-embedded-all.
The system shows the error as the following: -
Then I had added the JVM options as
--add-opens=java.base/sun.net.www.protocol.jar=ALL-UNNAMED
, there were failures to add more and more, then I ended up with the following:-The Arquillian archive had been deployed, but there was another failure as the following: -
Expected Outcome
The Arquilian archive have to be deployed to the payara-embedded-all and the test have to be success.
Current Outcome
By using the following: -
fish.payara.arquillian:arquillian-payara-server-embedded
version3.0.alpha8
fish.payara.extras:payara-embedded-all
version6.2023.7
There is a failure as the following: -
Then I had added the JVM options as
--add-opens=java.base/sun.net.www.protocol.jar=ALL-UNNAMED
, there were failures to add more and more, then I ended up with the following:-The Arquillian archive had been deployed, but there was another failure as the following: -
Reproducer
I've created the reproducer at the following: -
Note
With Payara Micro: Succcess
fish.payara.arquillian:arquillian-payara-micro-managed
version 3.0.alpha8version
6.2023.7`With Payara Managed: Success
fish.payara.arquillian:arquillian-payara-server-managed
version3.0.alpha8
fish.payara.distributions:payara-ml:zip
version6.2023.7
Operating System
Windows 11 Home Single Language 22H2 22621.1992
JDK Version
openjdk version "17.0.8" 2023-07-18
OpenJDK Runtime Environment Temurin-17.0.8+7 (build 17.0.8+7)
OpenJDK 64-Bit Server VM Temurin-17.0.8+7 (build 17.0.8+7, mixed mode, sharing)
Payara Distribution
Payara Embedded All
The text was updated successfully, but these errors were encountered: