From 0811c8d3751d00350d7ccfded7d53747047cf6da Mon Sep 17 00:00:00 2001 From: Foivos Zakkak Date: Fri, 18 Oct 2024 15:10:19 +0300 Subject: [PATCH] Start Jaeger to avoid errors related to opentracing/opentelemetry Closes https://github.com/Karm/mandrel-integration-tests/issues/290 --- .../java/org/graalvm/tests/integration/PerfCheckTest.java | 3 +++ .../org/graalvm/tests/integration/RuntimesSmokeTest.java | 3 +++ .../graalvm/tests/integration/utils/BuildAndRunCmds.java | 6 ++++++ 3 files changed, 12 insertions(+) diff --git a/testsuite/src/it/java/org/graalvm/tests/integration/PerfCheckTest.java b/testsuite/src/it/java/org/graalvm/tests/integration/PerfCheckTest.java index 03221cc..4dcb775 100644 --- a/testsuite/src/it/java/org/graalvm/tests/integration/PerfCheckTest.java +++ b/testsuite/src/it/java/org/graalvm/tests/integration/PerfCheckTest.java @@ -80,6 +80,7 @@ import static org.graalvm.tests.integration.utils.Commands.parsePort; import static org.graalvm.tests.integration.utils.Commands.parseSerialGCLog; import static org.graalvm.tests.integration.utils.Commands.processStopper; +import static org.graalvm.tests.integration.utils.Commands.removeContainer; import static org.graalvm.tests.integration.utils.Commands.runCommand; import static org.graalvm.tests.integration.utils.Commands.waitForFileToMatch; import static org.graalvm.tests.integration.utils.Commands.waitForTcpClosed; @@ -430,6 +431,7 @@ public void testQuarkusFullMicroProfile(TestInfo testInfo) throws IOException, I try { // Cleanup cleanTarget(app); + removeContainer("quarkus_jaeger"); Files.createDirectories(Paths.get(appDir.getAbsolutePath(), "logs")); if (patch != null) { @@ -524,6 +526,7 @@ public void testQuarkusFullMicroProfile(TestInfo testInfo) throws IOException, I "target", "quarkus-native-image-source-jar", "quarkus-json.json").toFile()); Logs.archiveLog(cn, mn, processLog); cleanTarget(app); + removeContainer("quarkus_jaeger"); if (patch != null) { runCommand(getRunCommand("git", "apply", "-R", patch), appDir); } diff --git a/testsuite/src/it/java/org/graalvm/tests/integration/RuntimesSmokeTest.java b/testsuite/src/it/java/org/graalvm/tests/integration/RuntimesSmokeTest.java index 754ff2f..0556855 100644 --- a/testsuite/src/it/java/org/graalvm/tests/integration/RuntimesSmokeTest.java +++ b/testsuite/src/it/java/org/graalvm/tests/integration/RuntimesSmokeTest.java @@ -55,6 +55,7 @@ import static org.graalvm.tests.integration.utils.Commands.getRunCommand; import static org.graalvm.tests.integration.utils.Commands.parsePort; import static org.graalvm.tests.integration.utils.Commands.processStopper; +import static org.graalvm.tests.integration.utils.Commands.removeContainer; import static org.graalvm.tests.integration.utils.Commands.runCommand; import static org.graalvm.tests.integration.utils.Commands.stopAllRunningContainers; import static org.graalvm.tests.integration.utils.Commands.stopRunningContainer; @@ -86,6 +87,7 @@ public void testRuntime(TestInfo testInfo, Apps app, Map switchR try { // Cleanup cleanTarget(app); + removeContainer("quarkus_jaeger"); if (app.runtimeContainer != ContainerNames.NONE) { // If we are about to be working with containers, we need a clean slate. stopAllRunningContainers(); @@ -170,6 +172,7 @@ public void testRuntime(TestInfo testInfo, Apps app, Map switchR // it might be valuable to have the binary and not just the logs? // Nope: Delete it. One can reproduce it from the journal file we maintain. cleanTarget(app); + removeContainer("quarkus_jaeger"); } } diff --git a/testsuite/src/it/java/org/graalvm/tests/integration/utils/BuildAndRunCmds.java b/testsuite/src/it/java/org/graalvm/tests/integration/utils/BuildAndRunCmds.java index 1436e1c..2e25a86 100755 --- a/testsuite/src/it/java/org/graalvm/tests/integration/utils/BuildAndRunCmds.java +++ b/testsuite/src/it/java/org/graalvm/tests/integration/utils/BuildAndRunCmds.java @@ -99,6 +99,9 @@ public enum BuildAndRunCmds { ), QUARKUS_FULL_MICROPROFILE( new String[][] { + { CONTAINER_RUNTIME, "run", "--rm", "-d", "-p", "4317:4317", "-e", "COLLECTOR_OTLP_ENABLED=true", "-p", "5775:5775/udp", "-p", "6831:6831/udp", "-p", "6832:6832/udp", "-p", "5778:5778", "-p", + "16686:16686", "-p", "14268:14268", "--name", "quarkus_jaeger", "quay.io/jaegertracing/all-in-one:latest" + }, { "mvn", "package", "-Pnative", "-Dquarkus.version=" + QUARKUS_VERSION.getVersionString(), "-Dquarkus.native.additional-build-args=" + "-H:Log=registerResource:," + @@ -119,6 +122,9 @@ public enum BuildAndRunCmds { ), QUARKUS_FULL_MICROPROFILE_PERF( new String[][] { + { CONTAINER_RUNTIME, "run", "--rm", "-d", "-p", "4317:4317", "-e", "COLLECTOR_OTLP_ENABLED=true", "-p", "5775:5775/udp", "-p", "6831:6831/udp", "-p", "6832:6832/udp", "-p", "5778:5778", "-p", + "16686:16686", "-p", "14268:14268", "--name", "quarkus_jaeger", "quay.io/jaegertracing/all-in-one:latest" + }, { "mvn", "package", "-Pnative", "-Dquarkus.version=" + QUARKUS_VERSION.getVersionString(), "-Dquarkus.native.additional-build-args=" + "-H:Log=registerResource:," +