MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / TestTicker_StopTwice

Function TestTicker_StopTwice

internal/utils/ticker_test.go:84–99  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

82}
83
84func TestTicker_StopTwice(t *testing.T) {
85 if !testutils.IsSingleTesting() {
86 return
87 }
88
89 ticker := NewTicker(3 * time.Second)
90 go func() {
91 time.Sleep(10 * time.Second)
92 ticker.Stop()
93 ticker.Stop()
94 }()
95 for ticker.Next() {
96 t.Log("tick")
97 }
98 t.Log("finished")
99}

Callers

nothing calls this directly

Calls 5

StopMethod · 0.95
NextMethod · 0.95
IsSingleTestingFunction · 0.92
NewTickerFunction · 0.85
LogMethod · 0.80

Tested by

no test coverage detected