From b76a1df27d96fd86bbf4d7fdbabc272f78b44147 Mon Sep 17 00:00:00 2001 From: Daniel Waterworth Date: Thu, 1 Aug 2019 09:49:03 +0100 Subject: [PATCH] FIX: Don't reuse redis connections in different threads in tests Redis connections aren't threadsafe since they have state, (watched keys). --- spec/components/distributed_mutex_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/components/distributed_mutex_spec.rb b/spec/components/distributed_mutex_spec.rb index 95588c1267a..ddce89abe66 100644 --- a/spec/components/distributed_mutex_spec.rb +++ b/spec/components/distributed_mutex_spec.rb @@ -12,7 +12,7 @@ describe DistributedMutex do it "allows only one mutex object to have the lock at a time" do mutexes = (1..10).map do - DistributedMutex.new(key) + DistributedMutex.new(key, redis: DiscourseRedis.new) end x = 0