-
Notifications
You must be signed in to change notification settings - Fork 123
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
TCK : Get hostname and port number injected using ArquillianResource url #1243
base: main
Are you sure you want to change the base?
TCK : Get hostname and port number injected using ArquillianResource url #1243
Conversation
@alwin-joseph Seems like the preferred way now is to drop the second year in the copyright header, instead of updating it as you have done. |
...ava/ee/jakarta/tck/ws/rs/api/rs/ext/interceptor/reader/interceptorcontext/JAXRSClientIT.java
Show resolved
Hide resolved
I tried it with Helidon and @alwin-joseph branch:
It seems MultipartSupportIT was added in other commit, so I guess from Helidon point of view this PR looks fine:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this makes a lot of sense. I made a couple comments that IMO should not block merging given our short time frame.
The two main things I've seen is most of the simple invocations to the I was wrong as the parent super.setup()
are not required as the @BeforeEach
will be inherited.setup()
is not annotated with @BeforeEach
.
Also the pattern of port -> string back to an integer doesn't give us much for the isNullOrEmpty()
as it will never be null
or empty.
I also ran this change against RESTEasy and it passes all but the known issues with the signature tests.
...ava/ee/jakarta/tck/ws/rs/api/rs/ext/interceptor/reader/interceptorcontext/JAXRSClientIT.java
Show resolved
Hide resolved
jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/resource/java2entity/JAXRSClientIT.java
Show resolved
Hide resolved
} | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't be required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree. It was not introduced in this PR, diff has the same line removed at the beginning. Hopefully these along with other occurrences can be addressed in later changes.
...s-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/cookieparam/locator/JAXRSLocatorClientIT.java
Outdated
Show resolved
Hide resolved
jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/client/webtarget/JAXRSClientIT.java
Show resolved
Hide resolved
jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/client/instance/JAXRSClientIT.java
Show resolved
Hide resolved
|
I'm not Alwin, but I can answer some of this :)
It's pulled from the
It more than likely depends, but we could try it with a static |
IIUC the Arquillian adapter for each container handles it. The current jersey-tck/ module uses We could also try
Agree static |
Maybe there is a better way (with BeforeAll) but as I see it needs full revamp of the current code structure mostly because the parent JAXRSCommonClient is used for all (with and without deployment) tests. |
I am not very happy with this PR, but maybe I do not see something. Basically this PR:
|
FWIW JUnit constructs the test for each test method anyway so The port would be changed in the container and the test would get the correct URL, with the correct deployment context path. The hard-coded host/ports should probably be configurable via a system property. That said, I agree this could wait. |
That's my bad, then.
Which container? The Arquillian container, the WebServer, or some other? I really would think it is changed in arquillian.xml. |
Nah, it's definitely not well known and honestly took me by surprised when I was debugging once :)
By container, I mean the application server. Arquillian has a I will say this only works for container tests. API tests that are not run with Arquillian wouldn't work. |
This is hard to imagine tbh. whatever lib lies beneath needs to ask the server, but the server needs to listen on some port. If the port is changed, there would need to be some way to tell the arquillian whom to ask. Or instead, tell the Arquillian the port directly. There is the following settings in the arquillian.xml:
Which I assume is what is needed, but I would need to test it.
The API tests do not need the server, so I assume either port is fine. |
tl;dr Yes, the URL is created based on the Longer answer: Yes, that is how it should work. Arquillian works on the observer pattern and it sends events. It sends an event to start the server and the For injecting the URL, that happens after the deployment has been done. The The port itself can only be changed before the server is started, so we don't really need to be too concerned about it changing. |
I still do not understand the purpose. Instead of setting the port in the
which might be intentional, or might be moved to the super-class, but the PR description does not say. |
These are some very good points and is likely a reason we should wait until after 4.0 for this given our very short time frame. I do think the issues will be addressable, but I don't feel we should rush them. |
This does the same as the common setup method in ee.jakarta.tck.ws.rs.common.JAXRSCommonClient. In some scenarios the test class files(*IT.java) get inherited from other test files (eg: ee.jakarta.tck.ws.rs.ee.rs.cookieparam.sub.JAXRSSubClientIT -> ee.jakarta.tck.ws.rs.ee.rs.cookieparam.JAXRSClientIT ) I dont know if removing
Yes, this is something that could be moved to super-class ee.jakarta.tck.ws.rs.common.JAXRSCommonClient, which was not intended to be in this PR, I can add it here.
I agree we can address these issues after 4.0, my only concern is that to make large changes to the TCK we will have to wait till next major release. But considering there are real concerns with regards to this PR we can hold this off for later time. |
So it sounds like instead of copying the setup logic over to sub-classes, it would be better to change the DEFAULT deployment name to some unique one. From what I understand from the conversation related to the current release, we want to start working on 5.0 somewhat soonish so that we are ready for EE12, as the transition to CDI is rather a big deal. We will have time to revisit this and address the concerns. |
@alwin-joseph @jansupol @jamezp @jbescos @jim-krueger Is anyone against pushing this PR to 5.0? |
Pushing off to 5.0 seems fine with me. |
@jim-krueger @jamezp @jansupol @arjantijms @spericas