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

Function TestStopInNew

services/basic_service_test.go:90–100  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

88}
89
90func TestStopInNew(t *testing.T) {
91 t.Parallel()
92
93 s := newServ(servConf{})
94
95 require.Equal(t, New, s.State())
96 s.StopAsync()
97 require.Error(t, s.AwaitRunning(context.Background()))
98 require.NoError(t, s.AwaitTerminated(context.Background()))
99 require.Equal(t, Terminated, s.State())
100}
101
102func TestAllFunctionality(t *testing.T) {
103 errStartFailed := errors.New("start failed")

Callers

nothing calls this directly

Calls 7

newServFunction · 0.85
StateMethod · 0.65
StopAsyncMethod · 0.65
AwaitRunningMethod · 0.65
AwaitTerminatedMethod · 0.65
EqualMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected