MCPcopy Index your code
hub / github.com/coder/coder / TestCronClose

Function TestCronClose

agent/agentscripts/agentscripts_test.go:157–162  ·  view source on GitHub ↗

TestCronClose exists because cron.Run() can happen after cron.Close(). If this happens, there used to be a deadlock.

(t *testing.T)

Source from the content-addressed store, hash-verified

155// TestCronClose exists because cron.Run() can happen after cron.Close().
156// If this happens, there used to be a deadlock.
157func 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
164func TestExecuteOptions(t *testing.T) {
165 t.Parallel()

Callers

nothing calls this directly

Calls 3

NewFunction · 0.92
StartCronMethod · 0.80
CloseMethod · 0.65

Tested by

no test coverage detected