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

Function TestInstanceNoLimits

modules/livestore/instance_test.go:185–198  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

183}
184
185func TestInstanceNoLimits(t *testing.T) {
186 instance, ls := instanceWithPushLimits(t, 0, 0) // no limits by default
187
188 for range 100 {
189 id := test.ValidTraceID(nil)
190 pushTrace(t.Context(), t, instance, test.MakeTrace(1, id), id)
191 }
192
193 assert.Equal(t, uint64(100), instance.liveTraces.Len())
194 assert.GreaterOrEqual(t, instance.liveTraces.Size(), uint64(1000))
195
196 err := services.StopAndAwaitTerminated(t.Context(), ls)
197 require.NoError(t, err)
198}
199
200func TestInstanceBackpressure(t *testing.T) {
201 instance, ls := defaultInstance(t)

Callers

nothing calls this directly

Calls 8

ValidTraceIDFunction · 0.92
MakeTraceFunction · 0.92
instanceWithPushLimitsFunction · 0.85
pushTraceFunction · 0.85
ContextMethod · 0.65
LenMethod · 0.65
SizeMethod · 0.65
EqualMethod · 0.45

Tested by

no test coverage detected