test: adds a retry to transaction finalized event checks#29855
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Performance Test Selection: |
|



Description
The Transaction Finalized event may not be fired immediately so there is a race condition between the E2E check and the timing for the event to be fired. This PR adds a retry mechanism to want a maximum of 5s before actually throwing the error when the event is not fired at all.
Changelog
CHANGELOG entry:
Related issues
Fixes: https://consensys.slack.com/archives/C02U025CVU4/p1778143821257179
Manual testing steps
N/A
Screenshots/Recordings
Before
N/A
After
N/A
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Low Risk
Low risk: test-only change that adds polling before failing when the analytics event arrives late; no production logic is affected.
Overview
Reduces flakiness in the send confirmation smoke test by polling for the
Transaction FinalizedMetaMetrics event (up to 5 attempts with a 1s delay) before failing the transaction-hash validation.Also updates the helper to import and use the
EventPayloadtype for the retried lookup.Reviewed by Cursor Bugbot for commit d151e36. Bugbot is set up for automated code reviews on this repo. Configure here.