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

Method WaitTracesQueryable

integration/util/harness.go:387–400  ·  view source on GitHub ↗
(t *testing.T, traces int)

Source from the content-addressed store, hash-verified

385}
386
387func (h *TempoHarness) WaitTracesQueryable(t *testing.T, traces int) {
388 t.Helper()
389
390 liveStoreZoneA := h.Services[ServiceLiveStoreZoneA]
391 require.NoError(t, liveStoreZoneA.WaitSumMetricsWithOptions(e2e.GreaterOrEqual(float64(traces)), []string{"tempo_live_store_traces_created_total"}, e2e.WaitMissingMetrics))
392
393 liveStoreZoneB := h.Services[ServiceLiveStoreZoneB]
394 require.NoError(t, liveStoreZoneB.WaitSumMetricsWithOptions(e2e.GreaterOrEqual(float64(traces)), []string{"tempo_live_store_traces_created_total"}, e2e.WaitMissingMetrics))
395
396 // Honor query_end_cutoff: the frontend clamps each request's `end` to `now - cutoff`,
397 // so a trace written at time T is not queryable until T + cutoff. Wait for that window
398 // to elapse since the most recent write before letting the test assert queryability.
399 h.waitForQueryEndCutoff(t)
400}
401
402// waitForQueryEndCutoff sleeps until enough wall-clock time has passed since the last
403// recorded write for traces to fall inside the queryable window defined by

Callers 15

TestEncodingsFunction · 0.80
TestQueryLimitsFunction · 0.80
TestLimitsPartialSuccessFunction · 0.80
TestQueryRangeExemplarsFunction · 0.80
TestQueryRangeMaxSeriesFunction · 0.80
TestQueryRangeEndCutoffFunction · 0.80
TestMCPFunction · 0.80
testSearchFunction · 0.80
TestTagEndpointsFunction · 0.80

Calls 1

waitForQueryEndCutoffMethod · 0.95

Tested by 15

TestEncodingsFunction · 0.64
TestQueryLimitsFunction · 0.64
TestLimitsPartialSuccessFunction · 0.64
TestQueryRangeExemplarsFunction · 0.64
TestQueryRangeMaxSeriesFunction · 0.64
TestQueryRangeEndCutoffFunction · 0.64
TestMCPFunction · 0.64
testSearchFunction · 0.64
TestTagEndpointsFunction · 0.64