Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
zeitlinger committed Aug 27, 2024
1 parent 516d92f commit a83b06c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ void noopObservableLongUpDownCounter_doesNotThrow() {
}

@Test
void noopObservableDoubleUpDownCounter_doesNotThrow() {
void noopObservableDoubleUpDownCounter_doesNotThrow() {
meter
.upDownCounterBuilder("temperature")
.ofDoubles()
Expand All @@ -245,7 +245,7 @@ void noopObservableDoubleUpDownCounter_doesNotThrow() {
}

@Test
void noopBatchCallback_doesNotThrow() {
void noopBatchCallback_doesNotThrow() {
meter.batchCallback(() -> {}, null);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public abstract class AbstractDefaultTracerTest {
public abstract TracerProvider getTracerProvider();

@Test
void returnsDefaultTracer() {
void returnsDefaultTracer() {
TracerProvider tracerProvider = getTracerProvider();
Class<? extends Tracer> want = defaultTracer.getClass();
assertThat(
Expand All @@ -50,13 +50,13 @@ void returnsDefaultTracer() {
}

@Test
void defaultSpanBuilderWithName() {
void defaultSpanBuilderWithName() {
assertThat(defaultTracer.spanBuilder(SPAN_NAME).startSpan().getSpanContext().isValid())
.isFalse();
}

@Test
void spanContextPropagationExplicitParent() {
void spanContextPropagationExplicitParent() {
assertThat(
defaultTracer
.spanBuilder(SPAN_NAME)
Expand All @@ -70,7 +70,7 @@ void spanContextPropagationExplicitParent() {
}

@Test
void spanContextPropagation() {
void spanContextPropagation() {
Span parent = Span.wrap(spanContext);

Span span =
Expand All @@ -79,37 +79,37 @@ void spanContextPropagation() {
}

@Test
void noSpanContextMakesInvalidSpans() {
void noSpanContextMakesInvalidSpans() {
Span span = defaultTracer.spanBuilder(SPAN_NAME).startSpan();
assertThat(span.getSpanContext()).isSameAs(SpanContext.getInvalid());
}

@Test
void spanContextPropagation_fromContext() {
void spanContextPropagation_fromContext() {
Context context = Context.current().with(Span.wrap(spanContext));

Span span = defaultTracer.spanBuilder(SPAN_NAME).setParent(context).startSpan();
assertThat(span.getSpanContext()).isSameAs(spanContext);
}

@Test
void spanContextPropagation_fromContextAfterNoParent() {
void spanContextPropagation_fromContextAfterNoParent() {
Context context = Context.current().with(Span.wrap(spanContext));

Span span = defaultTracer.spanBuilder(SPAN_NAME).setNoParent().setParent(context).startSpan();
assertThat(span.getSpanContext()).isSameAs(spanContext);
}

@Test
void spanContextPropagation_fromContextThenNoParent() {
void spanContextPropagation_fromContextThenNoParent() {
Context context = Context.current().with(Span.wrap(spanContext));

Span span = defaultTracer.spanBuilder(SPAN_NAME).setParent(context).setNoParent().startSpan();
assertThat(span.getSpanContext()).isEqualTo(SpanContext.getInvalid());
}

@Test
void doNotCrash_NoopImplementation() {
void doNotCrash_NoopImplementation() {
assertThatCode(
() -> {
SpanBuilder spanBuilder = defaultTracer.spanBuilder(null);
Expand Down

0 comments on commit a83b06c

Please sign in to comment.