From 4e05b8e85a59e48eecccb7574592ed62ce397d62 Mon Sep 17 00:00:00 2001 From: Alberto Codutti Date: Tue, 21 Jan 2025 11:18:34 +0100 Subject: [PATCH] :recycle: [Test] Cleanup Signed-off-by: Alberto Codutti --- .../kapua/qa/integration/steps/DockerSteps.java | 5 ++++- .../steps/utils/TestReadinessHttpConnection.java | 2 +- .../steps/utils/TestReadinessMqttBrokerConnection.java | 10 ++++------ 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/qa/integration-steps/src/main/java/org/eclipse/kapua/qa/integration/steps/DockerSteps.java b/qa/integration-steps/src/main/java/org/eclipse/kapua/qa/integration/steps/DockerSteps.java index e3347a20d92..02ed2367c94 100644 --- a/qa/integration-steps/src/main/java/org/eclipse/kapua/qa/integration/steps/DockerSteps.java +++ b/qa/integration-steps/src/main/java/org/eclipse/kapua/qa/integration/steps/DockerSteps.java @@ -257,6 +257,9 @@ public void startFullDockerEnvironment() throws Exception { /** * Starts Docker container requested. * + * TODO: Add missing Telemetry mapping + * TODO: Move to start multiple resources and check readiness of components in parallel + * * @param dockerContainers The Docker containers to start * @throws Exception * @since 2.1.0 @@ -313,7 +316,7 @@ public void startDockerEnvironmentWithResources(List dockerContainers) t case "events-broker": case "job-engine": case "message-broker": { - // Nothing to do. Those containers are delay-based. + // Nothing to do. // Waiting to refactor them } break; case "broker-auth-service": { diff --git a/qa/integration-steps/src/main/java/org/eclipse/kapua/qa/integration/steps/utils/TestReadinessHttpConnection.java b/qa/integration-steps/src/main/java/org/eclipse/kapua/qa/integration/steps/utils/TestReadinessHttpConnection.java index 9cf05473db8..74d6b91d8eb 100644 --- a/qa/integration-steps/src/main/java/org/eclipse/kapua/qa/integration/steps/utils/TestReadinessHttpConnection.java +++ b/qa/integration-steps/src/main/java/org/eclipse/kapua/qa/integration/steps/utils/TestReadinessHttpConnection.java @@ -17,7 +17,7 @@ import java.net.URL; /** - * Wrapper for {@link HttpURLConnection} that implements {@link AutoCloseable} + * Test readiness for HTTP-based components utility. * * @since 2.1.0 */ diff --git a/qa/integration-steps/src/main/java/org/eclipse/kapua/qa/integration/steps/utils/TestReadinessMqttBrokerConnection.java b/qa/integration-steps/src/main/java/org/eclipse/kapua/qa/integration/steps/utils/TestReadinessMqttBrokerConnection.java index 2004272beeb..037b4d725ed 100644 --- a/qa/integration-steps/src/main/java/org/eclipse/kapua/qa/integration/steps/utils/TestReadinessMqttBrokerConnection.java +++ b/qa/integration-steps/src/main/java/org/eclipse/kapua/qa/integration/steps/utils/TestReadinessMqttBrokerConnection.java @@ -18,10 +18,8 @@ import org.eclipse.paho.client.mqttv3.MqttSecurityException; import org.eclipse.paho.client.mqttv3.persist.MemoryPersistence; -import java.net.HttpURLConnection; - /** - * Wrapper for {@link HttpURLConnection} that implements {@link AutoCloseable} + * Test readiness for Message Broker utility. * * @since 2.1.0 */ @@ -41,9 +39,9 @@ public TestReadinessMqttBrokerConnection(String testReadinessAddress) { } /** - * Checks that the HTTP returns the expected HTTP response code. + * Checks that the MQTT returns an authentication error. * - * @return {@code true} if expected code is returned, {@code false} otherwise + * @return {@code true} if expected error is returned, {@code false} otherwise * @throws MqttException * @since 2.1.0 */ @@ -73,7 +71,7 @@ public boolean isReady() throws MqttException { } /** - * Invokes {@link HttpURLConnection#disconnect()} to clean up resources. + * Invokes {@link MqttClient#close()} to clean up resources. * * @since 2.1.0 */