diff options
Diffstat (limited to 'spec/lib/gitlab/database/consistency_spec.rb')
-rw-r--r-- | spec/lib/gitlab/database/consistency_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/lib/gitlab/database/consistency_spec.rb b/spec/lib/gitlab/database/consistency_spec.rb index 35fa65512ae..5055be81c88 100644 --- a/spec/lib/gitlab/database/consistency_spec.rb +++ b/spec/lib/gitlab/database/consistency_spec.rb @@ -7,6 +7,14 @@ RSpec.describe Gitlab::Database::Consistency do Gitlab::Database::LoadBalancing::Session.current end + before do + Gitlab::Database::LoadBalancing::Session.clear_session + end + + after do + Gitlab::Database::LoadBalancing::Session.clear_session + end + describe '.with_read_consistency' do it 'sticks to primary database' do expect(session).not_to be_using_primary |