mirror of
https://github.com/discourse/discourse.git
synced 2025-03-19 18:55:29 +08:00
FIX: Don't reuse redis connections in different threads in tests
Redis connections aren't threadsafe since they have state, (watched keys).
This commit is contained in:
parent
7bd93eba3e
commit
b76a1df27d
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user