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

Function TestWrongKV

pkg/usagestats/reporter_test.go:247–265  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

245}
246
247func TestWrongKV(t *testing.T) {
248 synctest.Test(t, func(t *testing.T) {
249 objectClient, err := local.NewBackend(&local.Config{
250 Path: t.TempDir(),
251 })
252 require.NoError(t, err)
253
254 r, err := NewReporter(Config{Leader: true, Enabled: true}, kv.Config{
255 Store: "",
256 }, objectClient, objectClient, log.NewNopLogger(), prometheus.NewPedanticRegistry())
257 require.NoError(t, err)
258 ctx, cancel := context.WithCancel(context.Background())
259 go func() {
260 <-time.After(1 * time.Second)
261 cancel()
262 }()
263 require.Equal(t, context.Canceled, r.running(ctx))
264 })
265}

Callers

nothing calls this directly

Calls 5

runningMethod · 0.95
NewBackendFunction · 0.92
NewReporterFunction · 0.85
TestMethod · 0.80
EqualMethod · 0.45

Tested by

no test coverage detected