File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ package tracer
77
88import (
99 "sync"
10+ "sync/atomic"
1011 "testing"
1112 "time"
1213
@@ -85,13 +86,13 @@ func TestEnqueuedTracesHealthMetric(t *testing.T) {
8586 tracer .StartSpan ("operation" ).Finish ()
8687 }
8788 flush (3 )
88- tg .Wait (assert , 1 , 10 * time .Second )
8989
90- counts := tg .Counts ()
91- assert .Equal (int64 (3 ), counts ["datadog.tracer.queue.enqueued.traces" ])
92- w , ok := tracer .traceWriter .(* agentTraceWriter )
93- assert .True (ok )
94- assert .Equal (uint32 (0 ), w .tracesQueued )
90+ assert .Eventually (func () bool {
91+ return tg .Counts ()["datadog.tracer.queue.enqueued.traces" ] == int64 (3 )
92+ }, 5 * time .Second , 10 * time .Millisecond )
93+
94+ w := tracer .traceWriter .(* agentTraceWriter )
95+ assert .Equal (uint32 (0 ), atomic .LoadUint32 (& w .tracesQueued ))
9596}
9697
9798func TestSpansStartedTags (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments