Some tracers currently set a flag if their "begin" action was called to trace, and then use it to determine whether or not their end or error should trace. But when the begin, end or error callbacks trace at different levels, that can mean they are fooled into not tracing.
Example, suppose only Error level is enabled. A BeginTrace traces at Info level, and its trace callback is never called. An exception is caught, and the "error" delegate wants to trace at Error or Warn levels. If it relies on the "begin" delegate from having been called, it will not trace at all.
Unit tests should include a trace writer accepting only Error level traces. They should then cause the "execute" delegate of the tracer to throw. If an Error level trace is not recorded, it means that tracer is affected by this bug. HttpActionInvokerTracer is an example of a faulty tracer.
Example, suppose only Error level is enabled. A BeginTrace traces at Info level, and its trace callback is never called. An exception is caught, and the "error" delegate wants to trace at Error or Warn levels. If it relies on the "begin" delegate from having been called, it will not trace at all.
Unit tests should include a trace writer accepting only Error level traces. They should then cause the "execute" delegate of the tracer to throw. If an Error level trace is not recorded, it means that tracer is affected by this bug. HttpActionInvokerTracer is an example of a faulty tracer.