From aceb5b2ee9f5b97abcf8599cdb5d2007eb4dad49 Mon Sep 17 00:00:00 2001 From: Lauri Tulmin Date: Wed, 29 Mar 2023 13:51:08 +0300 Subject: [PATCH] Disable jfr telemetry test on openj9 (#8161) --- .../runtimetelemetryjfr/JfrTelemetryBuilderTest.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/instrumentation/runtime-telemetry-jfr/library/src/test/java/io/opentelemetry/instrumentation/runtimetelemetryjfr/JfrTelemetryBuilderTest.java b/instrumentation/runtime-telemetry-jfr/library/src/test/java/io/opentelemetry/instrumentation/runtimetelemetryjfr/JfrTelemetryBuilderTest.java index df6ca4b2d1ff..7cb9663689f1 100644 --- a/instrumentation/runtime-telemetry-jfr/library/src/test/java/io/opentelemetry/instrumentation/runtimetelemetryjfr/JfrTelemetryBuilderTest.java +++ b/instrumentation/runtime-telemetry-jfr/library/src/test/java/io/opentelemetry/instrumentation/runtimetelemetryjfr/JfrTelemetryBuilderTest.java @@ -10,10 +10,21 @@ import io.opentelemetry.api.OpenTelemetry; import java.util.Arrays; import java.util.HashMap; +import org.junit.jupiter.api.Assumptions; +import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; class JfrTelemetryBuilderTest { + @BeforeAll + static void setup() { + try { + Class.forName("jdk.jfr.consumer.RecordingStream"); + } catch (ClassNotFoundException exception) { + Assumptions.abort("JFR not present"); + } + } + @Test void defaultFeatures() { var defaultFeatures = new HashMap();