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:
Guo Xiang Tan
2018-05-31 15:53:49 +08:00
parent 56e9ff6853
commit 7fc8a36529
45 changed files with 82 additions and 78 deletions

View File

@@ -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,