MCPcopy
hub / github.com/lxc/incus / startTask

Function startTask

internal/server/task/task_test.go:133–138  ·  view source on GitHub ↗

Convenience around task.Start which also makes sure that the stop function of the task actually terminates.

(t *testing.T, f task.Func, schedule task.Schedule)

Source from the content-addressed store, hash-verified

131// Convenience around task.Start which also makes sure that the stop function
132// of the task actually terminates.
133func startTask(t *testing.T, f task.Func, schedule task.Schedule) func() {
134 stop, _ := task.Start(context.Background(), f, schedule)
135 return func() {
136 assert.NoError(t, stop(time.Second))
137 }
138}

Callers 6

TestTask_ZeroIntervalFunction · 0.85
TestTask_ScheduleErrorFunction · 0.85
TestTask_SkipFirstFunction · 0.85

Calls 1

StartFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…