diff --git a/integration_test_suite/integration_tests/src/test/java/io/prometheus/jmx/test/support/ExporterTestEnvironment.java b/integration_test_suite/integration_tests/src/test/java/io/prometheus/jmx/test/support/ExporterTestEnvironment.java index dc06cdd1..f0ee308d 100644 --- a/integration_test_suite/integration_tests/src/test/java/io/prometheus/jmx/test/support/ExporterTestEnvironment.java +++ b/integration_test_suite/integration_tests/src/test/java/io/prometheus/jmx/test/support/ExporterTestEnvironment.java @@ -160,17 +160,17 @@ public String getBaseUrl() { /** Method to destroy the test environment */ public void destroy() { if (javaAgentApplicationContainer != null) { - javaAgentApplicationContainer.close(); + javaAgentApplicationContainer.stop(); javaAgentApplicationContainer = null; } if (standaloneExporterContainer != null) { - standaloneExporterContainer.close(); + standaloneExporterContainer.stop(); standaloneExporterContainer = null; } if (standaloneApplicationContainer != null) { - standaloneApplicationContainer.close(); + standaloneApplicationContainer.stop(); standaloneApplicationContainer = null; } } diff --git a/integration_test_suite/integration_tests/src/test/java/io/prometheus/jmx/test/support/OpenTelemetryTestEnvironment.java b/integration_test_suite/integration_tests/src/test/java/io/prometheus/jmx/test/support/OpenTelemetryTestEnvironment.java index 23aa3187..08686672 100644 --- a/integration_test_suite/integration_tests/src/test/java/io/prometheus/jmx/test/support/OpenTelemetryTestEnvironment.java +++ b/integration_test_suite/integration_tests/src/test/java/io/prometheus/jmx/test/support/OpenTelemetryTestEnvironment.java @@ -207,22 +207,22 @@ private String getPrometheusBaseUrl() { /** Method to destroy the test environment */ public void destroy() { if (javaAgentApplicationContainer != null) { - javaAgentApplicationContainer.close(); + javaAgentApplicationContainer.stop(); javaAgentApplicationContainer = null; } if (standaloneExporterContainer != null) { - standaloneExporterContainer.close(); + standaloneExporterContainer.stop(); standaloneExporterContainer = null; } if (standaloneApplicationContainer != null) { - standaloneApplicationContainer.close(); + standaloneApplicationContainer.stop(); standaloneApplicationContainer = null; } if (prometheusContainer != null) { - prometheusContainer.close(); + prometheusContainer.stop(); prometheusContainer = null; } }