-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SpanCaptureReporter.collect returns spans from preceding tests #22
Comments
I'm having trouble solving the flip side of this problem, now: despite Update: I found I was running two reporters because I forgot about the way @doc "Collect spans from your process inbox."
@spec collect() :: list(%Span{})
def collect do
send(:oc_reporter, :report_spans)
:timer.sleep(10)
collect_span_records([]) |> Enum.map(&Span.from/1)
end |
Setting |
* Discard spans started before `attach/0` was called * Trigger `report/2` and wait 1ms before `collect/0` * Set and advise `send_interval_ms: 100` to reduce unpredictability of `report/2` time, which with `send_interval_ms: 1` would sometimes wait until after `detach/0`
* Discard spans started before `attach/0` was called * Trigger `report/2` and wait 1ms before `collect/0` * Set and advise `send_interval_ms: 100` to reduce unpredictability of `report/2` time, which with `send_interval_ms: 1` would sometimes wait until after `detach/0`
…-#22 Fix SpanCaptureReporter test spillage (#22)
I'm finding
SpanCaptureReporter
too brittle, with tests flaking out when:oc_reporter
waits longer than expected and callsreport/2
with spans from preceding tests after the current test callsattach/0
.Workaround:
The text was updated successfully, but these errors were encountered: