Skip to content

Commit

Permalink
Fix case where both http and https ports set to 0 in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
geoand committed Jul 19, 2023
1 parent 5726f7c commit 128c5d0
Showing 1 changed file with 16 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1173,22 +1173,23 @@ public void handle(AsyncResult<HttpServer> event) {
} else {
actualHttpPort = actualPort;
}
if (remainingCount.decrementAndGet() == 0) {
//make sure we only set the properties once
if (actualPort != options.getPort()) {
// Override quarkus.http(s)?.(test-)?port
String schema;
if (https) {
clearHttpsProperty = true;
schema = "https";
} else {
clearHttpProperty = true;
actualHttpPort = actualPort;
schema = "http";
}
portSystemProperties = new PortSystemProperties();
portSystemProperties.set(schema, actualPort, launchMode);
if (actualPort != options.getPort()) {
// Override quarkus.http(s)?.(test-)?port
String schema;
if (https) {
clearHttpsProperty = true;
schema = "https";
} else {
clearHttpProperty = true;
actualHttpPort = actualPort;
schema = "http";
}
portSystemProperties = new PortSystemProperties();
portSystemProperties.set(schema, actualPort, launchMode);
}

if (remainingCount.decrementAndGet() == 0) {
//make sure we only complete once
startFuture.complete(null);
}

Expand Down

0 comments on commit 128c5d0

Please sign in to comment.