Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

fix: remove flakyness for trace waterfall tests (#10734)

Nityananda Gohainf3e6892d5bcf
diff --git a/pkg/query-service/app/traces/tracedetail/waterfall_test.go b/pkg/query-service/app/traces/tracedetail/waterfall_test.go
index 98cf1c828b..5a7e1184cb 100644
--- a/pkg/query-service/app/traces/tracedetail/waterfall_test.go
+++ b/pkg/query-service/app/traces/tracedetail/waterfall_test.go
@@ -183,7 +183,7 @@ func TestGetSelectedSpans_PathReturnedInUncollapsed(t *testing.T) {
spanMap := buildSpanMap(root)
spans, uncollapsed, _, _ := GetSelectedSpans([]string{}, "selected", []*model.Span{root}, spanMap, false)
- assert.Equal(t, []string{"root", "parent"}, uncollapsed)
+ assert.ElementsMatch(t, []string{"root", "parent"}, uncollapsed)
assert.Equal(t, []string{"root", "parent", "selected"}, spanIDs(spans))
}
@@ -206,7 +206,7 @@ func TestGetSelectedSpans_SiblingsNotExpanded(t *testing.T) {
// children of root sort alphabetically: parent < unrelated; unrelated-child stays hidden
assert.Equal(t, []string{"root", "parent", "selected", "unrelated"}, spanIDs(spans))
// only the path nodes are tracked as uncollapsed — unrelated is not
- assert.Equal(t, []string{"root", "parent"}, uncollapsed)
+ assert.ElementsMatch(t, []string{"root", "parent"}, uncollapsed)
}
// An unknown selectedSpanID must not panic; returns a window from index 0.