From 1aac8721d9f360fa496ca1e7716edf7d56a0c111 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Tue, 27 May 2025 18:43:04 +0530 Subject: [PATCH] feat: delete mutex key --- spec/jobs/webhooks/instagram_events_job_spec.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spec/jobs/webhooks/instagram_events_job_spec.rb b/spec/jobs/webhooks/instagram_events_job_spec.rb index cd508e4e6..e43f7c814 100644 --- a/spec/jobs/webhooks/instagram_events_job_spec.rb +++ b/spec/jobs/webhooks/instagram_events_job_spec.rb @@ -7,6 +7,10 @@ describe Webhooks::InstagramEventsJob, :serial do stub_request(:post, /graph\.facebook\.com/) stub_request(:get, 'https://www.example.com/test.jpeg') .to_return(status: 200, body: '', headers: {}) + + # Clear Redis mutex key to prevent lock conflicts in parallel tests + mutex_key = format(Redis::Alfred::IG_MESSAGE_MUTEX, sender_id: 'Sender-id-1', ig_account_id: 'chatwoot-app-user-id-1') + Redis::Alfred.delete(mutex_key) end let!(:account) { create(:account) }