Skip to content
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 context root improvements #1190

Open
jbescos opened this issue Nov 14, 2023 · 2 comments
Open

TCK context root improvements #1190

jbescos opened this issue Nov 14, 2023 · 2 comments

Comments

@jbescos
Copy link
Member

jbescos commented Nov 14, 2023

Many tests are done to have the root context of a war file, but this it not valid in some frameworks like Helidon, where there is no such context root.

Any JAXRSClientIT contains the next 2 things:

setContextRoot("/jaxrs_spec_resource_valueofandfromstring_web");
...
WebArchive archive = ShrinkWrap.create(WebArchive.class, "jaxrs_spec_resource_valueofandfromstring_web.war");

We can see that explicitly sets the context root with the war name.

It would be really helpful for Helidon developers if TCKs takes the context root in this other way (as it is already done in rest/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/client/exceptions/ClientExceptionsIT.java):

    @ArquillianResource
    private URL baseUrl;

In this way the web container will provide the context root and we get rid of this issue in Helidon.

@jamezp
Copy link
Contributor

jamezp commented Nov 14, 2023

My assumption is this was because that's how the tests were and it was minimal effort to get them migrated to Arquillian based tests. However, using the URL, or URI, injection is the correct way to do it.

@spericas
Copy link
Contributor

@jbescos Feel free to create a PR for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants