From 2b4009c6bcc7744cd6d0b73b6b7c9b6e017fa42e Mon Sep 17 00:00:00 2001 From: Daniel Waterworth Date: Wed, 14 Dec 2022 15:11:46 -0600 Subject: [PATCH] DEV: Fake sleeping in distributed mutex tests (#19472) otherwise they take a looong time --- spec/lib/distributed_mutex_spec.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spec/lib/distributed_mutex_spec.rb b/spec/lib/distributed_mutex_spec.rb index accd753a62a..b1cf14c1789 100644 --- a/spec/lib/distributed_mutex_spec.rb +++ b/spec/lib/distributed_mutex_spec.rb @@ -1,6 +1,10 @@ # frozen_string_literal: true RSpec.describe DistributedMutex do + before do + DistributedMutex.any_instance.stubs(:sleep) + end + let(:key) { "test_mutex_key" } after do