From 3b631a587c981e610f6e86e7d9b3d1ce7549edd9 Mon Sep 17 00:00:00 2001 From: George Gastaldi Date: Fri, 27 Jan 2023 18:46:12 -0300 Subject: [PATCH] Use `quarkus.http.ssl-port` instead of `quarkus.https.port` Also change the port from which the secure connection is established from `quarkus.https.test-port` to `quarkus.http.test-ssl-port` - Fixes #20228 --- .../java/io/quarkus/vertx/http/runtime/VertxHttpRecorder.java | 4 ++-- .../java/io/quarkus/test/common/RestAssuredURLManager.java | 2 +- .../src/main/java/io/quarkus/test/QuarkusProdModeTest.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/VertxHttpRecorder.java b/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/VertxHttpRecorder.java index 18f5922d0140d..46574597ede7f 100644 --- a/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/VertxHttpRecorder.java +++ b/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/VertxHttpRecorder.java @@ -1348,8 +1348,8 @@ public void stop(Promise stopFuture) { } if (clearHttpsProperty) { - String portPropertyName = launchMode == LaunchMode.TEST ? "quarkus.https.test-port" - : "quarkus.https.port"; + String portPropertyName = launchMode == LaunchMode.TEST ? "quarkus.http.test-ssl-port" + : "quarkus.http.ssl-port"; System.clearProperty(portPropertyName); if (launchMode.isDevOrTest()) { System.clearProperty(propertyWithProfilePrefix(portPropertyName)); diff --git a/test-framework/common/src/main/java/io/quarkus/test/common/RestAssuredURLManager.java b/test-framework/common/src/main/java/io/quarkus/test/common/RestAssuredURLManager.java index 977ebad843e5d..a6e4dac9d4f7b 100644 --- a/test-framework/common/src/main/java/io/quarkus/test/common/RestAssuredURLManager.java +++ b/test-framework/common/src/main/java/io/quarkus/test/common/RestAssuredURLManager.java @@ -115,7 +115,7 @@ public static void setURL(boolean useSecureConnection, Integer port, String addi try { oldPort = (Integer) portField.get(null); if (port == null) { - port = useSecureConnection ? getPortFromConfig(DEFAULT_HTTPS_PORT, "quarkus.https.test-port") + port = useSecureConnection ? getPortFromConfig(DEFAULT_HTTPS_PORT, "quarkus.http.test-ssl-port") : getPortFromConfig(DEFAULT_HTTP_PORT, "quarkus.lambda.mock-event-server.test-port", "quarkus.http.test-port"); } diff --git a/test-framework/junit5-internal/src/main/java/io/quarkus/test/QuarkusProdModeTest.java b/test-framework/junit5-internal/src/main/java/io/quarkus/test/QuarkusProdModeTest.java index 23ff28ca54916..2284f19120cf7 100644 --- a/test-framework/junit5-internal/src/main/java/io/quarkus/test/QuarkusProdModeTest.java +++ b/test-framework/junit5-internal/src/main/java/io/quarkus/test/QuarkusProdModeTest.java @@ -655,7 +655,7 @@ private void setupRestAssured() { .map(Integer::parseInt) .orElse(DEFAULT_HTTP_PORT_INT); - // If http port is 0, then we need to set the port to null in order to use the `quarkus.https.test-port` property + // If http port is 0, then we need to set the port to null in order to use the `quarkus.http.test-ssl-port` property // which is done in `RestAssuredURLManager.setURL`. if (httpPort == 0) { httpPort = null;