Skip to content

Commit

Permalink
[chore] fix flaky selection of traces (signalfx#1383)
Browse files Browse the repository at this point in the history
  • Loading branch information
atoulme authored Aug 9, 2024
1 parent c04118b commit d817468
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions functional_tests/functional_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ func testNodeJSTraces(t *testing.T) {
for i := len(tracesConsumer.AllTraces()) - 1; i > 0; i-- {
trace := tracesConsumer.AllTraces()[i]
if val, ok := trace.ResourceSpans().At(0).Resource().Attributes().Get("telemetry.sdk.language"); ok && strings.Contains(val.Str(), "nodejs") {
if expectedTraces.SpanCount() == trace.SpanCount() {
if expectedTraces.SpanCount() == trace.SpanCount() && expectedTraces.ResourceSpans().Len() == trace.ResourceSpans().Len() {
selectedTrace = &trace
break
}
Expand Down Expand Up @@ -647,7 +647,7 @@ func testJavaTraces(t *testing.T) {
for i := len(tracesConsumer.AllTraces()) - 1; i > 0; i-- {
trace := tracesConsumer.AllTraces()[i]
if val, ok := trace.ResourceSpans().At(0).Resource().Attributes().Get("telemetry.sdk.language"); ok && strings.Contains(val.Str(), "java") {
if expectedTraces.SpanCount() == trace.SpanCount() {
if expectedTraces.SpanCount() == trace.SpanCount() && expectedTraces.ResourceSpans().Len() == trace.ResourceSpans().Len() {
selectedTrace = &trace
break
}
Expand Down

0 comments on commit d817468

Please sign in to comment.