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

Function TestTicker

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

Source from the content-addressed store, hash-verified

26}
27
28func TestTicker(t *testing.T) {
29 if !testutils.IsSingleTesting() {
30 return
31 }
32
33 ticker := NewTicker(3 * time.Second)
34 go func() {
35 time.Sleep(10 * time.Second)
36 ticker.Stop()
37 }()
38 for ticker.Next() {
39 t.Log("tick")
40 }
41 t.Log("finished")
42}
43
44func TestTicker2(t *testing.T) {
45 if !testutils.IsSingleTesting() {

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