diff --git a/dispatcher_test.go b/dispatcher_test.go index f762b13..8921ae7 100644 --- a/dispatcher_test.go +++ b/dispatcher_test.go @@ -248,7 +248,13 @@ func TestDispatcher_DispatchLoop_Good_NilClientSkipsTick(t *testing.T) { func TestDispatcher_Dispatch_Good_Concurrent(t *testing.T) { d, reg, store := setupDispatcher(t, nil) - registerAgent(t, reg, store, "agent-1", nil, 0) // unlimited + registerAgent(t, reg, store, "agent-1", nil, 0) + // Override allowance to truly unlimited (registerAgent hardcodes ConcurrentJobs: 5) + _ = store.SetAllowance(&AgentAllowance{ + AgentID: "agent-1", + DailyJobLimit: 100, + ConcurrentJobs: 0, // 0 = unlimited + }) var wg sync.WaitGroup for i := 0; i < 10; i++ {