MCPcopy
hub / github.com/robfig/cron / TestNoEntries

Function TestNoEntries

cron_test.go:86–95  ·  view source on GitHub ↗

Start and stop cron with no entries.

(t *testing.T)

Source from the content-addressed store, hash-verified

84
85// Start and stop cron with no entries.
86func TestNoEntries(t *testing.T) {
87 cron := newWithSeconds()
88 cron.Start()
89
90 select {
91 case <-time.After(OneSecond):
92 t.Fatal("expected cron will be stopped immediately")
93 case <-stop(cron):
94 }
95}
96
97// Start, stop, then add an entry. Verify entry doesn't run.
98func TestStopCausesJobsToNotRun(t *testing.T) {

Callers

nothing calls this directly

Calls 3

newWithSecondsFunction · 0.85
stopFunction · 0.85
StartMethod · 0.80

Tested by

no test coverage detected