summaryrefslogtreecommitdiff
path: root/internal/executor/executor_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/executor/executor_test.go')
-rw-r--r--internal/executor/executor_test.go16
1 files changed, 3 insertions, 13 deletions
diff --git a/internal/executor/executor_test.go b/internal/executor/executor_test.go
index d8a2b77..878a32d 100644
--- a/internal/executor/executor_test.go
+++ b/internal/executor/executor_test.go
@@ -751,19 +751,9 @@ func TestPool_ActivePerAgent_DeletesZeroEntries(t *testing.T) {
pool.Submit(context.Background(), tk)
<-pool.Results()
- // The deferred cleanup in execute() runs after resultCh is sent, so poll
- // briefly for the map entry to be removed rather than checking immediately.
- var exists bool
- deadline := time.Now().Add(100 * time.Millisecond)
- for time.Now().Before(deadline) {
- pool.mu.Lock()
- _, exists = pool.activePerAgent["claude"]
- pool.mu.Unlock()
- if !exists {
- break
- }
- time.Sleep(time.Millisecond)
- }
+ pool.mu.Lock()
+ _, exists := pool.activePerAgent["claude"]
+ pool.mu.Unlock()
if exists {
t.Error("activePerAgent should not have a zero-count entry for claude after task completes")