-
Notifications
You must be signed in to change notification settings - Fork 3k
Change ArtifactLauncher.start to return the listening address #51367
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
Conversation
This comment has been minimized.
This comment has been minimized.
1a0bd5c to
22bea87
Compare
This comment has been minimized.
This comment has been minimized.
22bea87 to
f7c1842
Compare
This comment has been minimized.
This comment has been minimized.
c6b11f9 to
7922fa3
Compare
This comment has been minimized.
This comment has been minimized.
7922fa3 to
33aa961
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
geoand
left a comment
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.
Very nice cleanup!
33aa961 to
fcb8ad0
Compare
|
Pushed an update to extract https://github.com/quarkusio/quarkus/pull/51367/files#diff-0976161629e37650ede7638425bb54845838f7aeb4fc3fae3e30a66153411784R36-R57 and apply it to all launchers (was only being applied to the native launcher). |
for awt-packaging test: I need to deal with the AWS Lambda thing in there... I appreciate ideas. |
Can you please clarify? Are you already using this PR? |
This comment has been minimized.
This comment has been minimized.
|
@Karm are we ok to merge this? or are you having issues? |
fcb8ad0 to
26e0418
Compare
Calling
ArtifactLauncher.startto start Quarkus now returns anOptional<ListeningAddress>, which was already available when starting the process internally. TheListeningAddressis then registered with the testContext, which allows us to avoid using System properties to propagate the running port.This also means that it removes the ability to query
quarkus.http.portandquarkus.http.test-portfrom the test itself usingConfigto get the real port (in case of using a random port for integration tests). From our tests, I don't see us doing that, but that doesn't mean users out there aren't. We could probably add a JUnitParameterResolverto support injection of theListeningAddress, but I'm not sure if this would be the final API we want to expose, since I think it would be interesting to have a unified API for both test and regular runtime. The real port is still registered withRESTAssured, so that is a way to get it if required. Again, this only applies to tests running outside Quarkus.Also,
io.quarkus.test.junit.QuarkusTestProfile#getConfigOverrides, which was being set inSystemProperties, was moved to set the properties directly into the runner arguments, and set directly into theCuratedApplicationwhen we require DevServices. This also means that properties set byio.quarkus.test.junit.QuarkusTestProfile#getConfigOverridescan no longer be retrieved byConfigProvider.getConfigin integration-tests. Unsure if this is something that users use, but I'm thinking that we need to ban the usage ofConfigProvider.getConfig, and offer it as a test parameter, so we can create local instances to each test.If this becomes a big issue, we can temporarily register the ports with System properties again. Hopefully, it shouldn't be required if we can do all the related work in a single release. This relates to:
Splitting this into smaller PRs to make it easier to review and track.