Closed EricWittmann closed 5 years ago
On PTO today, but this piqued my interest. Wonder if using the reserve-network-port feature for build-helper-maven-plugin might be appropriate here?
https://www.mojohaus.org/build-helper-maven-plugin/reserve-network-port-mojo.html
It finds an unused port for you, which should help prevent collisions in most cases.
On 17 Dec 2018, at 13:14, Eric Wittmann notifications@github.com wrote:
The tests start up a server on port 8080. Instead, it should start the server on a random port and then use that. Otherwise it's very possible to collide with something else running on the machine.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/smallrye/smallrye-open-api/issues/57, or mute the thread https://github.com/notifications/unsubscribe-auth/AAZ2WehOINKEDWOCD0QeX9Xvj-2A_Z4eks5u55ivgaJpZM4ZWVGI.
Yeah that could work. Thanks for the tip.
I can do this one if you like
Okay, took a little longer than expected, but got it done. Turns out that there's a way to globally set the port in the client :-). The issue I initially hit is that there's no obvious way to override the DSL in AppTestBase#callEndpoint
to set port
in the normal way.
See #61
The tests start up a server on port 8080. Instead, it should start the server on a random port and then use that. Otherwise it's very possible to collide with something else running on the machine.