opentracing / opentracing-java

OpenTracing API for Java. 🛑 This library is DEPRECATED! https://github.com/opentracing/specification/issues/163
http://opentracing.io
Apache License 2.0
1.68k stars 344 forks source link

MockTracer.reset doesn't appear to work all cases #356

Open mdedetrich opened 5 years ago

mdedetrich commented 5 years ago

From the PR here https://github.com/opentracing-contrib/scala-concurrent/pull/7 it appears that in some cases MockTracer.reset() doesn't appear to clear all spans, quoting the PR.

Note that for some reason, one test is still failing, i.e.

  • testNoActiveSpan FAILED {traceId:1, spanId:2, parentId:0, operationName:"one"} did not equal null (TracedExecutionContextTest.scala:75)

For some reason the testPropagation test is leaving over the span and its not getting reset by mockTracer.reset(), do you have any idea what could be going on here?

You can use mvn:test to reproduce the problem.

yurishkuro commented 5 years ago

Perhaps you have a race condition in your code, where some span is getting finish()-ed after reset() is called.