MCPcopy Create free account
hub / github.com/cortexproject/cortex / TestStopInNew

Function TestStopInNew

pkg/util/services/basic_service_test.go:89–99  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected