mirror of
https://github.com/chatwoot/chatwoot.git
synced 2026-06-13 21:01:16 +08:00
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 |
||
|---|---|---|
| .. | ||
| campaigns | ||
| csat_surveys | ||
| messages | ||
| v2 | ||
| account_builder_spec.rb | ||
| agent_builder_spec.rb | ||
| contact_inbox_builder_spec.rb | ||
| contact_inbox_with_contact_builder_spec.rb | ||
| conversation_builder_spec.rb | ||
| notification_builder_spec.rb | ||