Skip to content

Commit

Permalink
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package io.opentelemetry.javaagent.tooling

import io.opentelemetry.api.GlobalOpenTelemetry
import io.opentelemetry.api.OpenTelemetry
import io.opentelemetry.api.events.GlobalEventEmitterProvider
import io.opentelemetry.api.logs.GlobalLoggerProvider
import spock.lang.Specification

Expand All @@ -15,11 +16,13 @@ class OpenTelemetryInstallerTest extends Specification {
void setup() {
GlobalOpenTelemetry.resetForTest()
GlobalLoggerProvider.resetForTest()
GlobalEventEmitterProvider.resetForTest()
}

void cleanup() {
GlobalOpenTelemetry.resetForTest()
GlobalLoggerProvider.resetForTest()
GlobalEventEmitterProvider.resetForTest()
}

def "should initialize GlobalOpenTelemetry"() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import static org.assertj.core.api.Assertions.assertThat;

import io.opentelemetry.api.GlobalOpenTelemetry;
import io.opentelemetry.api.events.GlobalEventEmitterProvider;
import io.opentelemetry.api.logs.GlobalLoggerProvider;
import io.opentelemetry.javaagent.tooling.OpenTelemetryInstaller;
import io.opentelemetry.sdk.autoconfigure.AutoConfiguredOpenTelemetrySdk;
Expand All @@ -33,6 +34,7 @@ class ConfigurationFileLoaderTest {
static void cleanUp() {
GlobalOpenTelemetry.resetForTest();
GlobalLoggerProvider.resetForTest();
GlobalEventEmitterProvider.resetForTest();
}

// regression for https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/6696
Expand Down

0 comments on commit cde6c98

Please sign in to comment.