|
3 | 3 | * SPDX-License-Identifier: Apache-2.0
|
4 | 4 | */
|
5 | 5 |
|
6 |
| -package io.opentelemetry.api.trace; |
| 6 | +package io.opentelemetry.api.testing.internal; |
7 | 7 |
|
8 | 8 | import static io.opentelemetry.api.common.AttributeKey.stringKey;
|
9 | 9 | import static org.assertj.core.api.Assertions.assertThat;
|
10 | 10 | import static org.assertj.core.api.Assertions.assertThatCode;
|
11 | 11 |
|
12 | 12 | import io.opentelemetry.api.common.AttributeKey;
|
13 | 13 | import io.opentelemetry.api.common.Attributes;
|
| 14 | +import io.opentelemetry.api.trace.Span; |
| 15 | +import io.opentelemetry.api.trace.SpanBuilder; |
| 16 | +import io.opentelemetry.api.trace.SpanContext; |
| 17 | +import io.opentelemetry.api.trace.TraceFlags; |
| 18 | +import io.opentelemetry.api.trace.TraceState; |
| 19 | +import io.opentelemetry.api.trace.Tracer; |
| 20 | +import io.opentelemetry.api.trace.TracerProvider; |
14 | 21 | import io.opentelemetry.context.Context;
|
15 | 22 | import java.time.Instant;
|
16 | 23 | import java.util.concurrent.TimeUnit;
|
17 | 24 | import org.junit.jupiter.api.Test;
|
18 | 25 |
|
19 |
| -/** Unit tests for {@link DefaultTracer}. */ |
| 26 | +/** Unit tests for No-op {@link Tracer}. */ |
20 | 27 | // Need to suppress warnings for MustBeClosed because Android 14 does not support
|
21 | 28 | // try-with-resources.
|
22 | 29 | @SuppressWarnings("MustBeClosedChecker")
|
@@ -56,6 +63,7 @@ void defaultSpanBuilderWithName() {
|
56 | 63 | }
|
57 | 64 |
|
58 | 65 | @Test
|
| 66 | + @SuppressWarnings("NullAway") |
59 | 67 | void spanContextPropagationExplicitParent() {
|
60 | 68 | assertThat(
|
61 | 69 | defaultTracer
|
@@ -109,6 +117,7 @@ void spanContextPropagation_fromContextThenNoParent() {
|
109 | 117 | }
|
110 | 118 |
|
111 | 119 | @Test
|
| 120 | + @SuppressWarnings("NullAway") |
112 | 121 | void doNotCrash_NoopImplementation() {
|
113 | 122 | assertThatCode(
|
114 | 123 | () -> {
|
|
0 commit comments