SECURITY: Don't allow a particular site to monopolize the defer queue

This commit is contained in:
Daniel Waterworth
2023-07-28 12:53:51 +01:00
committed by David Taylor
parent 0736611423
commit 26e267478d
5 changed files with 361 additions and 8 deletions

View File

@ -225,4 +225,12 @@ RSpec.describe Hijack do
expect(ran).to eq(false)
end
it "handles the queue being full" do
Scheduler::Defer.stubs(:later).raises(WorkQueue::WorkQueueFull.new)
tester.hijack_test {}
expect(tester.response.status).to eq(503)
end
end