Skip to content

Commit

Permalink
Address Feedback
Browse files Browse the repository at this point in the history
Signed-off-by: Mahad Zaryab <[email protected]>
  • Loading branch information
mahadzaryab1 committed Dec 18, 2024
1 parent eb93365 commit f4811ad
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions cmd/query/app/querysvc/adjuster/spaniduniquifier_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,14 @@ func TestSpanIDUniquifierError(t *testing.T) {

maxID := pcommon.SpanID([8]byte{255, 255, 255, 255, 255, 255, 255, 255})

deduper := &spanIDDeduper{spansByID: make(map[pcommon.SpanID][]ptrace.Span), maxUsedID: maxID}
deduper := &spanIDDeduper{
spansByID: make(map[pcommon.SpanID][]ptrace.Span),
// instead of 0 start at the last possible value to cause an error
maxUsedID: maxID,
}
require.NoError(t, deduper.adjust(traces))

span := traces.ResourceSpans().At(0).ScopeSpans().At(0).Spans().At(1)
warnings := jptrace.GetWarnings(span)
require.Len(t, warnings, 1)
require.Equal(t, "cannot assign unique span ID, too many spans in the trace", warnings[0])
require.Equal(t, []string{"cannot assign unique span ID, too many spans in the trace"}, warnings)
}

0 comments on commit f4811ad

Please sign in to comment.