(t *testing.T)
| 241 | } |
| 242 | |
| 243 | func TestManagerConcurrentAccess(t *testing.T) { |
| 244 | tmpDir := t.TempDir() |
| 245 | prdPath := createTestPRDWithName(t, tmpDir, "test-prd") |
| 246 | |
| 247 | m := NewManager(10, testProvider) |
| 248 | m.Register("test-prd", prdPath) |
| 249 | |
| 250 | // Test concurrent access to manager methods |
| 251 | var wg sync.WaitGroup |
| 252 | for i := 0; i < 100; i++ { |
| 253 | wg.Add(1) |
| 254 | go func() { |
| 255 | defer wg.Done() |
| 256 | _ = m.GetInstance("test-prd") |
| 257 | _ = m.GetAllInstances() |
| 258 | _ = m.GetRunningPRDs() |
| 259 | _ = m.GetRunningCount() |
| 260 | _, _, _ = m.GetState("test-prd") |
| 261 | }() |
| 262 | } |
| 263 | wg.Wait() |
| 264 | } |
| 265 | |
| 266 | func TestLoopStateString(t *testing.T) { |
| 267 | tests := []struct { |
nothing calls this directly
no test coverage detected