-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
QuarkusIntegrationTest: Access to DevServices after #18933 #19080
Comments
/cc @geoand, @stuartwdouglas |
Thanks for reporting! |
I'll try and take a look next week |
Any progress on this? It worked in 2.1.0.CR1 and Final only. It is still broken in 2.4.1.Final. Desperately needed. |
What is your exact use case? |
Thanks for your quick response. I am using a WireMockServer inside an implementation of QuarkusTestResourceLifecycleManager to stub a graphql service. During integration test phase on Linux using the application image, the application gets lauched as:
and the application cannot reach localhost:8080 Everything will run fine with the '--network host' option, but that won't work on windows apparently. With Quarkus 2.1.0.Final the application integration-test was working, it launched as:
Since 2.2.0.Final and up to 2.4.1.Final it is broken. How to proceed? |
…vailable This is pretty much the same as we did in 21287, but it now works regardless of the presence of DevServices. The difference with containers launched by DevServices, is that in this case we now need to manage the creation and deletion of the network, whereas in the case of DevServices we got that for free by utilizing testcontainers Resolves: quarkusio#19080
This should be taken care of in Essentially what that PR brings is the ability to know the network the application container (by implementing |
When launching a container via @QuarkusIntegrationTest make network available
Looking forward to 2.5.0 ;) |
If all goes well, |
Unfortunately, it still does not work with 2.5.0.Final. I have tried it on both openSUSE Tumbleweed and LEAP where 2.1.0.Final works great. What can I do to help troubleshoot the issue? |
What does your code look like? What containers are launched when you start the test? |
I have created a small project that can be used to hammer out the integration test issue. It will succeed with 2.1.0.Final but will fail with a higher version, including 2.5.0.Final. Where do I put it? |
Just upload it to Github |
Well here it is: https://github.com/Koekebakkert/quarkus-wiremockserver-integration-test-service Feel free to ask any question ;) |
Thanks, I'll try and have a look tomorrow |
I need to think about how this can be addressed. |
Actually there is no good way to support that use case if we want to support the more common case where a supporting container is launched. You'll probably have to switch from Wiremock to https://www.testcontainers.org/modules/mockserver/ |
Description
Issue #18854 allowed access to the dev service urls inside integration tests.
However, issue #18933 causes dev services to be started inside a shared network which will return urls inside that network. The integration test however is run from the host, which has no access to that shared network.
Could you add a method for integration tests, to acces the dev services?
Implementation ideas
Expose a property with postfix .from-host that will contain the original URL (with the mapped port)?
The text was updated successfully, but these errors were encountered: