File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
dd-java-agent/testing/src
main/java/datadog/trace/agent/test Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ public boolean add(final List<DDSpan> trace) {
85
85
};
86
86
TEST_TRACER = new DDTracer (TEST_WRITER );
87
87
TestUtils .registerOrReplaceGlobalTracer ((Tracer ) TEST_TRACER );
88
- GlobalTracer .registerIfAbsent ((DDTracer ) TEST_TRACER );
88
+ GlobalTracer .registerIfAbsent ((datadog . trace . api . Tracer ) TEST_TRACER );
89
89
}
90
90
91
91
protected static Tracer getTestTracer () {
Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ class AgentTestRunnerTest extends AgentTestRunner {
10
10
private static final boolean AGENT_INSTALLED_IN_CLINIT
11
11
// having opentracing class in test field should not cause problems
12
12
private static final Tracer A_TRACER = null
13
+ // having dd tracer api class in test field should not cause problems
14
+ private static final datadog.trace.api.Tracer DD_API_TRACER = null
13
15
14
16
static {
15
17
// when test class initializes, opentracing should be set up, but not the agent.
@@ -20,11 +22,13 @@ class AgentTestRunnerTest extends AgentTestRunner {
20
22
def " classpath setup" () {
21
23
expect :
22
24
A_TRACER == null
25
+ DD_API_TRACER == null
23
26
OT_LOADER == BOOTSTRAP_CLASSLOADER
24
27
! AGENT_INSTALLED_IN_CLINIT
25
28
getTestTracer() == TestUtils . getUnderlyingGlobalTracer()
26
29
getAgentTransformer() != null
27
30
datadog.trace.api.Trace . getClassLoader() == BOOTSTRAP_CLASSLOADER
31
+ TestUtils . getUnderlyingGlobalTracer() == datadog.trace.api.GlobalTracer . get()
28
32
}
29
33
30
34
def " logging works" () {
You can’t perform that action at this time.
0 commit comments