-
Notifications
You must be signed in to change notification settings - Fork 196
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
TestResult instance is not properly produced using Junit5 inside the container #539
Comments
If I run the tests on the https://github.com/TheOnlyAl/arquillian-junit5-container-testresultfix.git project, they just hang with messages about
|
Very strange. Seems that this could be a problem with an already mapped port of 5900 and hazelcast for the embedded payara . If you can check if this port is already mapped and disable it, it might work, otherwise i could try to check if i can find out how to disable it. |
Hi @starksm64 i pushed an update where i changed the default hazelcast port to 15900. Seems there is a bug with some screen sharing software which reserves the port: |
Ok, got it |
Sorry, can I ask a question: I'm just a arquillian user in my project and not so deep in the internals. Can you please have a look to the following problem: Is this maybe related, so I can't control the transaction handling with junit5. |
Hi @uvula. |
Hello @TheOnlyAl, Gradle:
arquillian.xml:
and/or annotations My Junit tests are NOT failing. But I see, after calling a method of the stateless Any hints? |
Issue Overview
I believe there is a problem when running Junit5 tests in the container because the
TestResult
instance is not set before theAfter
phase is executed. In my opionion this leads for example to the following issue:arquillian/arquillian-extension-transaction#31
Junit4 seems to corretly inject the result. Propably by using UpdateTestResultBeforeAfter.java
Expected Behaviour
The
TestResult
should be set before theAfter
phase is executed for Junit5 tests.Current Behaviour
The
TestResult
is not set.Steps To Reproduce
I created a small project (arquillian-junit5-container-testresultfix) which uses an custom Extension to check if the
TestResult
is set and also provides an Extension which provides a workaround for the problem.To check if the result is not set, you could:
The tests will all succeed as long the the result is not set. When this is fixed at least the UnfixedTestResultIT.java should fail
Additional Information
I did a lot of debugging for this problem since it basically makes most of my tests using transactions fail. It is quite hard to really understand where the problem is. It could be a missing interceptor, missing observer, or something else.
Since there is also seems currently no other easys way for extensions to get the Result of a test after its run but before the After phase is called, i am not sure how else extensions should work.
Checked for: Arquillian 1.8.0.Final
Please just tell me if you need any more information. I am happy to try to help as much as possible.
The text was updated successfully, but these errors were encountered: