MCPcopy
hub / github.com/grafana/dskit / TestHelperFunctionsStartError

Function TestHelperFunctionsStartError

services/services_test.go:81–89  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

79}
80
81func TestHelperFunctionsStartError(t *testing.T) {
82 t.Parallel()
83
84 e := errors.New("some error")
85 s := NewIdleService(func(context.Context) error { return e }, nil)
86
87 require.Equal(t, e, StartAndAwaitRunning(context.Background(), s))
88 require.Equal(t, e, StopAndAwaitTerminated(context.Background(), s))
89}
90
91func TestHelperFunctionsStartTooSlow(t *testing.T) {
92 t.Parallel()

Callers

nothing calls this directly

Calls 4

NewIdleServiceFunction · 0.85
StartAndAwaitRunningFunction · 0.85
StopAndAwaitTerminatedFunction · 0.85
EqualMethod · 0.45

Tested by

no test coverage detected