mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Take 2 Queue jobs in tests by default.
On my machine this cuts the time taken to run our test suite from ~11mins to ~9mins.
This commit is contained in:
@@ -176,6 +176,10 @@ RSpec.describe TopicTimer, type: :model do
|
||||
)
|
||||
end
|
||||
|
||||
before do
|
||||
SiteSetting.queue_jobs = false
|
||||
end
|
||||
|
||||
it 'should close the topic' do
|
||||
topic_timer
|
||||
expect(topic.reload.closed).to eq(true)
|
||||
@@ -201,6 +205,10 @@ RSpec.describe TopicTimer, type: :model do
|
||||
)
|
||||
end
|
||||
|
||||
before do
|
||||
SiteSetting.queue_jobs = false
|
||||
end
|
||||
|
||||
it 'should open the topic' do
|
||||
topic_timer
|
||||
expect(topic.reload.closed).to eq(false)
|
||||
@@ -239,10 +247,6 @@ RSpec.describe TopicTimer, type: :model do
|
||||
end
|
||||
|
||||
describe '.ensure_consistency!' do
|
||||
before do
|
||||
SiteSetting.queue_jobs = true
|
||||
end
|
||||
|
||||
it 'should enqueue jobs that have been missed' do
|
||||
close_topic_timer = Fabricate(:topic_timer,
|
||||
execute_at: Time.zone.now - 1.hour,
|
||||
|
||||
Reference in New Issue
Block a user