diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-05 21:10:13 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-05 21:10:13 +0300 |
commit | a150bd5bac8535d5a38e0a8c60c30e45b1582413 (patch) | |
tree | 16c9623ffc5ccffc543136a77148c8b3d4679558 /spec/workers | |
parent | 01034c2c457bad1933e954ba01e5f21cdf546168 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/workers')
-rw-r--r-- | spec/workers/authorized_project_update/user_refresh_from_replica_worker_spec.rb | 6 | ||||
-rw-r--r-- | spec/workers/container_expiration_policy_worker_spec.rb | 6 |
2 files changed, 2 insertions, 10 deletions
diff --git a/spec/workers/authorized_project_update/user_refresh_from_replica_worker_spec.rb b/spec/workers/authorized_project_update/user_refresh_from_replica_worker_spec.rb index c27629c3a15..027ce3b7f89 100644 --- a/spec/workers/authorized_project_update/user_refresh_from_replica_worker_spec.rb +++ b/spec/workers/authorized_project_update/user_refresh_from_replica_worker_spec.rb @@ -44,11 +44,7 @@ RSpec.describe AuthorizedProjectUpdate::UserRefreshFromReplicaWorker do end end - context 'with load balancing enabled' do - before do - allow(Gitlab::Database::LoadBalancing).to receive(:enable?).and_return(true) - end - + context 'with load balancing enabled', :db_load_balancing do it 'reads from the replica database' do expect(Gitlab::Database::LoadBalancing::Session.current).to receive(:use_replicas_for_read_queries).and_call_original diff --git a/spec/workers/container_expiration_policy_worker_spec.rb b/spec/workers/container_expiration_policy_worker_spec.rb index 69ddbe5c0f4..9f370b10f6a 100644 --- a/spec/workers/container_expiration_policy_worker_spec.rb +++ b/spec/workers/container_expiration_policy_worker_spec.rb @@ -156,11 +156,7 @@ RSpec.describe ContainerExpirationPolicyWorker do subject end - context 'with load balancing enabled' do - before do - allow(Gitlab::Database::LoadBalancing).to receive(:enable?).and_return(true) - end - + context 'with load balancing enabled', :db_load_balancing do it 'reads the counts from the replica' do expect(Gitlab::Database::LoadBalancing::Session.current).to receive(:use_replicas_for_read_queries).and_call_original |