(t *testing.T)
| 11 | ) |
| 12 | |
| 13 | func TestGroup_Add(t *testing.T) { |
| 14 | group := &task.Group{} |
| 15 | ok := make(chan struct{}) |
| 16 | f := func(context.Context) { close(ok) } |
| 17 | group.Add(f, task.Every(time.Second)) |
| 18 | group.Start(context.Background()) |
| 19 | |
| 20 | assertRecv(t, ok) |
| 21 | |
| 22 | assert.NoError(t, group.Stop(time.Second)) |
| 23 | } |
| 24 | |
| 25 | func TestGroup_StopUngracefully(t *testing.T) { |
| 26 | group := &task.Group{} |
nothing calls this directly
no test coverage detected
searching dependent graphs…