TestCronClose exists because cron.Run() can happen after cron.Close(). If this happens, there used to be a deadlock.
(t *testing.T)
| 155 | // TestCronClose exists because cron.Run() can happen after cron.Close(). |
| 156 | // If this happens, there used to be a deadlock. |
| 157 | func TestCronClose(t *testing.T) { |
| 158 | t.Parallel() |
| 159 | runner := agentscripts.New(agentscripts.Options{}) |
| 160 | runner.StartCron() |
| 161 | require.NoError(t, runner.Close(), "close runner") |
| 162 | } |
| 163 | |
| 164 | func TestExecuteOptions(t *testing.T) { |
| 165 | t.Parallel() |