lib/sidekiq/testing.rb in sidekiq-2.5.1 vs lib/sidekiq/testing.rb in sidekiq-2.5.2

- old
+ new

@@ -91,11 +91,12 @@ jobs.clear end # Drain all queued jobs across all workers def drain_all - jobs.keys.each(&:drain) - clear_all + until jobs.values.all?(&:empty?) do + jobs.keys.each(&:drain) + end end end end end