MCPcopy Create free account
hub / github.com/MiniCodeMonkey/chief / TestManagerStopAll

Function TestManagerStopAll

internal/loop/manager_test.go:314–336  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

312}
313
314func TestManagerStopAll(t *testing.T) {
315 tmpDir := t.TempDir()
316 prd1Path := createTestPRDWithName(t, tmpDir, "prd1")
317 prd2Path := createTestPRDWithName(t, tmpDir, "prd2")
318
319 m := NewManager(10, testProvider)
320 m.Register("prd1", prd1Path)
321 m.Register("prd2", prd2Path)
322
323 // StopAll should work even when nothing is running
324 done := make(chan struct{})
325 go func() {
326 m.StopAll()
327 close(done)
328 }()
329
330 select {
331 case <-done:
332 // Good, StopAll completed
333 case <-time.After(time.Second):
334 t.Error("StopAll did not complete in time")
335 }
336}
337
338func TestManagerSetMaxIterations(t *testing.T) {
339 m := NewManager(10, testProvider)

Callers

nothing calls this directly

Calls 4

RegisterMethod · 0.95
StopAllMethod · 0.95
createTestPRDWithNameFunction · 0.85
NewManagerFunction · 0.85

Tested by

no test coverage detected