Commit aefe79d2 authored by Vitali Tatarintev's avatar Vitali Tatarintev

Merge branch 'id-speed-up-batch-count-spec' into 'master'

Speed up spec/lib/gitlab/database/batch_count_spec.rb

See merge request gitlab-org/gitlab!42362
parents 3d29e784 e6d9ab1b
......@@ -9,12 +9,16 @@ RSpec.describe Gitlab::Database::BatchCount do
let(:column) { :author_id }
let(:in_transaction) { false }
let(:user) { create(:user) }
let(:another_user) { create(:user) }
before do
let_it_be(:user) { create(:user) }
let_it_be(:another_user) { create(:user) }
before_all do
create_list(:issue, 3, author: user)
create_list(:issue, 2, author: another_user)
end
before do
allow(ActiveRecord::Base.connection).to receive(:transaction_open?).and_return(in_transaction)
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment