From b2c8e99c28421cf3fa37529cdd6d39100379457a Mon Sep 17 00:00:00 2001 From: Matthew Landauer Date: Thu, 12 Sep 2024 04:28:02 +0000 Subject: [PATCH] Disable split during testing so that it doesn't try to talk to redis --- config/environments/test.rb | 1 - config/initializers/split.rb | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config/environments/test.rb b/config/environments/test.rb index a86be26b2..190e1551a 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -17,7 +17,6 @@ # The value is kind of irrelevant actually # TODO: Fix this config.x.sidekiq_redis_url = "redis://localhost:6379/0" - config.x.split_redis_url = "redis://redis:6379/4" ## User settings (END) diff --git a/config/initializers/split.rb b/config/initializers/split.rb index 73b9dba21..e0d9c4285 100644 --- a/config/initializers/split.rb +++ b/config/initializers/split.rb @@ -4,6 +4,9 @@ expire_seconds: 2592000) Split.configure do |config| + # Just disable A/B testing during tests so that it doesn't try to talk to redis + config.enabled = false if Rails.env.test? + config.redis = Rails.configuration.x.split_redis_url config.persistence = Split::Persistence::DualAdapter.with_config(