chatwoot/spec/builders
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
..
campaigns chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
csat_surveys chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
messages fix: resolve mutex conflicts in Instagram webhook specs (#12154) 2025-08-11 23:31:25 +05:30
v2 fix: missing metrics and labels from label summary (#11718) 2025-06-12 17:58:56 +05:30
account_builder_spec.rb fix: account email validation during signup (#11307) 2025-05-20 20:45:39 -07:00
agent_builder_spec.rb fix: Avoid duplicate invitation emails when adding an agent (#9131) 2024-03-26 18:58:45 -07:00
contact_inbox_builder_spec.rb chore: Add cache to improve widget performance (#11163) 2025-03-24 16:04:49 -07:00
contact_inbox_with_contact_builder_spec.rb feat: Instagram Inbox using Instagram Business Login (#11054) 2025-04-08 10:47:41 +05:30
conversation_builder_spec.rb feat: Ability to lock the conversation to a single thread in API channels (#10329) 2024-12-09 23:36:17 +08:00
notification_builder_spec.rb fix: Exclude notifications for blocked contacts, except mentions (#10659) 2025-01-12 15:30:27 +05:30