diff --git a/tests/integration/websocket_queue_integration_test.go b/tests/integration/websocket_queue_integration_test.go index e82c756..3e0c100 100644 --- a/tests/integration/websocket_queue_integration_test.go +++ b/tests/integration/websocket_queue_integration_test.go @@ -109,8 +109,11 @@ func TestWebSocketQueueEndToEnd(t *testing.T) { } submitWG.Wait() + // Give workers time to pick up any remaining tasks + time.Sleep(100 * time.Millisecond) + completed := 0 - timeout := time.After(30 * time.Second) + timeout := time.After(60 * time.Second) for completed < jobCount { select { case <-timeout: @@ -206,8 +209,11 @@ func TestWebSocketQueueEndToEndSQLite(t *testing.T) { } submitWG.Wait() + // Give workers time to pick up any remaining tasks + time.Sleep(100 * time.Millisecond) + completed := 0 - timeout := time.After(30 * time.Second) + timeout := time.After(60 * time.Second) for completed < jobCount { select { case <-timeout: @@ -310,11 +316,11 @@ func startFakeWorkers( task, err := taskQueue.GetNextTaskWithLease(workerID, 30*time.Second) if err != nil { t.Logf("worker %s queue error: %v", workerID, err) - time.Sleep(5 * time.Millisecond) + time.Sleep(time.Millisecond) continue } if task == nil { - time.Sleep(5 * time.Millisecond) + time.Sleep(time.Millisecond) continue }