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

Function TestNewDisableableTicker_Disabled

ring/ticker_test.go:22–34  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

20}
21
22func TestNewDisableableTicker_Disabled(t *testing.T) {
23 stop, ch := newDisableableTicker(0)
24 defer stop()
25
26 time.Sleep(100 * time.Millisecond)
27
28 select {
29 case <-ch:
30 t.Error("ticker should not have ticked when disabled")
31 default:
32 break
33 }
34}

Callers

nothing calls this directly

Calls 3

newDisableableTickerFunction · 0.85
SleepMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected