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

Function TestDoWriteWithError

cmd/tempo-vulture/main_test.go:251–265  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

249}
250
251func TestDoWriteWithError(t *testing.T) {
252 mockJaegerClient := MockReporter{err: errors.New("an error")}
253 // Define the configuration
254 config := vultureConfiguration{
255 tempoOrgID: "orgID",
256 tempoWriteBackoffDuration: time.Second,
257 }
258
259 ticker := time.NewTicker(10 * time.Millisecond)
260 logger = zap.NewNop()
261
262 doWrite(&mockJaegerClient, ticker, config.tempoWriteBackoffDuration, config, logger)
263 ticker.Stop()
264 assert.Equal(t, len(mockJaegerClient.GetEmittedBatches()), 0)
265}
266
267func TestQueueFutureBatches(t *testing.T) {
268 mockJaegerClient := MockReporter{err: nil}

Callers

nothing calls this directly

Calls 4

GetEmittedBatchesMethod · 0.95
doWriteFunction · 0.85
StopMethod · 0.65
EqualMethod · 0.45

Tested by

no test coverage detected