iachat/spec/jobs/webhooks
Sojan Jose c31325e982
fix: resolve mutex conflicts in Instagram webhook specs (#12154)
This PR fixes flaky test failures in the Instagram webhook specs that
were caused by Redis mutex lock conflicts when
   tests ran in parallel.

 ### The Problem:
The InstagramEventsJob uses a Redis mutex with a key based on sender_id
and ig_account_id to prevent race
conditions. However, all test factories were using the same hardcoded
sender_id: 'Sender-id-1', causing multiple
test instances to compete for the same mutex lock when running in
parallel.

 ### The Solution:
- Updated all Instagram event factories to generate unique sender IDs
using SecureRandom.hex(4)
- Modified test stubs and expectations to work with dynamic sender IDs
instead of hardcoded values
- Ensured each test instance gets its own unique mutex key, eliminating
lock contention
2025-08-11 23:31:25 +05:30
..
facebook_delivery_job_spec.rb feat: Facebook delivery reports (#8136) 2023-11-20 12:22:45 +05:30
facebook_events_job_spec.rb feat: implement mutex for SlackSendJob (#7783) 2023-08-25 11:58:29 +07:00
instagram_events_job_spec.rb fix: resolve mutex conflicts in Instagram webhook specs (#12154) 2025-08-11 23:31:25 +05:30
line_events_job_spec.rb chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
sms_events_job_spec.rb feat: Bandwidth sms channel delivery reports (#8198) 2023-10-27 14:07:15 -07:00
telegram_events_job_spec.rb chore: Add warning logs when Chatwoot receives events for inactive channels (#11066) 2025-03-12 08:16:47 -07:00
twilio_delivery_status_job_spec.rb chore: Move Twilio event processing to background job (#11094) 2025-03-15 13:51:08 -07:00
twilio_events_job_spec.rb fix: Support location messages in Twilio WhatsApp integration (#11830) 2025-06-30 11:35:32 +05:30
whatsapp_events_job_spec.rb chore: Logger for non-existent WhatsApp channels (#11064) 2025-03-12 15:50:38 -07:00