diff options
Diffstat (limited to 'spec/support/database_load_balancing.rb')
-rw-r--r-- | spec/support/database_load_balancing.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/support/database_load_balancing.rb b/spec/support/database_load_balancing.rb index 03fa7886295..7b0f49cb1b4 100644 --- a/spec/support/database_load_balancing.rb +++ b/spec/support/database_load_balancing.rb @@ -4,7 +4,9 @@ RSpec.configure do |config| config.before(:each, :db_load_balancing) do allow(Gitlab::Database::LoadBalancing).to receive(:enable?).and_return(true) - proxy = ::Gitlab::Database::LoadBalancing::ConnectionProxy.new([Gitlab::Database.main.config['host']]) + lb = ::Gitlab::Database::LoadBalancing::LoadBalancer + .new([Gitlab::Database.main.config['host']]) + proxy = ::Gitlab::Database::LoadBalancing::ConnectionProxy.new(lb) allow(ActiveRecord::Base).to receive(:load_balancing_proxy).and_return(proxy) |