(t *testing.T)
| 312 | } |
| 313 | |
| 314 | func 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 | |
| 338 | func TestManagerSetMaxIterations(t *testing.T) { |
| 339 | m := NewManager(10, testProvider) |
nothing calls this directly
no test coverage detected