Skip to content

Commit

Permalink
Suppress a variety of noisy test logs (open-telemetry#7154)
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-berg authored Feb 27, 2025
1 parent 313d391 commit cd1f617
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@
import com.fasterxml.jackson.core.JsonGenerator;
import io.github.netmikey.logunit.api.LogCapturer;
import io.opentelemetry.exporter.internal.marshal.Marshaler;
import io.opentelemetry.internal.testing.slf4j.SuppressLogger;
import java.io.IOException;
import java.util.logging.Logger;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
import org.mockito.Mockito;

@SuppressLogger(LoggerJsonWriter.class)
class LoggerJsonWriterTest {

@RegisterExtension
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import com.fasterxml.jackson.core.JsonGenerator;
import io.github.netmikey.logunit.api.LogCapturer;
import io.opentelemetry.exporter.internal.marshal.Marshaler;
import io.opentelemetry.internal.testing.slf4j.SuppressLogger;
import java.io.FilterOutputStream;
import java.io.IOException;
import java.io.OutputStream;
Expand All @@ -23,6 +24,7 @@
import org.mockito.Mockito;

@SuppressWarnings("SystemOut")
@SuppressLogger(StreamJsonWriter.class)
class StreamJsonWriterTest {

@RegisterExtension
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ void fetchHealth() {

@Test
@SuppressLogger(PrometheusHttpServer.class)
@SuppressLogger(Otel2PrometheusConverter.class)
void fetch_DuplicateMetrics() {
Resource resource = Resource.create(Attributes.of(stringKey("kr"), "vr"));
metricData.set(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import io.opentelemetry.api.common.AttributeKey;
import io.opentelemetry.api.common.Attributes;
import io.opentelemetry.internal.testing.slf4j.SuppressLogger;
import io.opentelemetry.sdk.autoconfigure.internal.SpiHelper;
import io.opentelemetry.sdk.autoconfigure.spi.internal.DefaultConfigProperties;
import io.opentelemetry.sdk.testing.assertj.AttributesAssert;
Expand All @@ -25,6 +26,7 @@
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;

@SuppressLogger(ResourceConfiguration.class)
class ResourceConfigurationTest {

private final SpiHelper spiHelper =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ void defaults() {
}

@Test
@SuppressLogger(ViewRegistry.class)
void findViews_ApplyAdvice() {
// use incompatible aggregation for histogram
DefaultAggregationSelector aggregationSelector =
Expand Down

0 comments on commit cd1f617

Please sign in to comment.