mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 07:53:49 +08:00
FIX: DiscourseRedis::FallbackHandler
not restricting number of threads spawned.
This commit is contained in:
@ -96,6 +96,14 @@ describe DiscourseRedis do
|
||||
fallback_handler.master = true
|
||||
end
|
||||
end
|
||||
|
||||
it "should restrict the number of checks" do
|
||||
expect { fallback_handler.verify_master }.to change { Thread.list.count }.by(1)
|
||||
expect(fallback_handler.master).to eq(true)
|
||||
|
||||
fallback_handler.master = false
|
||||
expect { fallback_handler.verify_master }.to_not change { Thread.list.count }
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user