correct flaky spec

correct flaky spec

diff --git a/spec/components/scheduler/manager_spec.rb b/spec/components/scheduler/manager_spec.rb
index 0a229ee..191e0f5 100644
--- a/spec/components/scheduler/manager_spec.rb
+++ b/spec/components/scheduler/manager_spec.rb
@@ -77,7 +77,7 @@ describe Scheduler::Manager do
     ActiveRecord::Base.connection_pool.connections.reject { |c| c.in_use? }.each do |c|
       ActiveRecord::Base.connection_pool.remove(c)
     end
-    expect(ActiveRecord::Base.connection_pool.connections.length).to eq(1)
+    expect(ActiveRecord::Base.connection_pool.connections.length).to (be <= 1)
 
     on_thread_mismatch = lambda do
       current = Thread.list.map { |t| t.object_id }

GitHub sha: 4ee2fcd3

1 Like

Not sure if I am going to give this heisentest status or not, it was weird for sure, but testing mini scheduler was just so fragile while it was living in core.