MCPcopy
hub / github.com/grafana/tempo / TestConstructTraceFromEpoch

Function TestConstructTraceFromEpoch

pkg/util/trace_info_test.go:97–110  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

95}
96
97func TestConstructTraceFromEpoch(t *testing.T) {
98 seed := time.Unix(0, testSeed)
99 info := NewTraceInfo(seed, "")
100
101 result, err := info.ConstructTraceFromEpoch()
102 require.NoError(t, err)
103 // Batch count is deterministic per seed; adding well-known attributes changes RNG sequence (now 8 batches for testSeed).
104 assert.Equal(t, 8, len(result.ResourceSpans))
105
106 result2, err := info.ConstructTraceFromEpoch()
107 require.NoError(t, err)
108
109 require.Equal(t, result, result2)
110}
111
112// assertStandardVultureKey checks that a tag has the expected type and value constraints.
113// All vulture-generated keys use a "vulture" prefix (e.g. vulture-0, vulture-process-string-01, vulture-event-blob-01).

Callers

nothing calls this directly

Calls 3

NewTraceInfoFunction · 0.85
EqualMethod · 0.45

Tested by

no test coverage detected