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

Get management interface resolved port when quarkus.management.test-port set to 0 #35952

Closed
will421 opened this issue Sep 15, 2023 · 0 comments · Fixed by #39588
Closed

Get management interface resolved port when quarkus.management.test-port set to 0 #35952

will421 opened this issue Sep 15, 2023 · 0 comments · Fixed by #39588

Comments

@will421
Copy link

will421 commented Sep 15, 2023

Description

Hi

I had some QuarkusTest for custom HealthChecks. With quarkus.http.test-port set to 0 to get a random port. While migrating to Quarkus 3, we choose to enable the management interface.

Now, when I set quarkus.management.test-port to 0, RestAssured still use the port of the HTTP server so my tests failed. I can set the port in the test but I don't know how to get the correct value.

Do you know of a way to get the management interface port ? I can't have a fixed quarkus.management.test-port because sometimes it's taken by another process on integration server

I can get the test http port with ConfigProvider.getConfig().getValue("quarkus.http.test-port", Integer.class) but for the management one, it still return 0

Thanks for your time

Implementation ideas

Could it work the same as quarkus.http.test-port ?

@will421 will421 added the kind/enhancement New feature or request label Sep 15, 2023
@will421 will421 changed the title Get management interface resolver port when quarkus.management.test-port set to 0 Get management interface resolved port when quarkus.management.test-port set to 0 Sep 15, 2023
@cescoffier cescoffier self-assigned this Mar 18, 2024
@cescoffier cescoffier removed their assignment Mar 20, 2024
@quarkus-bot quarkus-bot bot added this to the 3.10 - main milestone Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants