test: Fix flaky e2e signature tests#26771
Merged
pnarayanaswamy merged 6 commits intodevelopfrom Aug 30, 2024
Merged
Conversation
Contributor
|
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. |
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #26771 +/- ##
========================================
Coverage 70.13% 70.13%
========================================
Files 1417 1417
Lines 49440 49440
Branches 13833 13833
========================================
Hits 34672 34672
Misses 14768 14768 ☔ View full report in Codecov by Sentry. |
Collaborator
Builds ready [42f3913]
Page Load Metrics (1791 ± 82 ms)
Bundle size diffs
|
vinistevam
approved these changes
Aug 30, 2024
jpuri
approved these changes
Aug 30, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
Problem:
The SIWE and other signature tests have been experiencing flakiness, primarily due to unnecessary timeouts at the end of each test. These timeouts occur because the test setup waits for all mock requests to finish, even if some of those requests are not relevant to the specific test. This results in the tests waiting for API endpoints that were never called, causing unnecessary delays and timeouts.
Solution:
To resolve this, the fix involves splitting the mocked endpoints into two separate functions. Most signature-related tests only need to check for "Signature Approved" or "Signature Rejected" events, so these endpoints are isolated into a dedicated function. This change ensures that only the necessary mock endpoints are passed to each test, reducing the likelihood of waiting for unused endpoints and improving overall test reliability.
Related issues
Fixes: #26760 #26761 26610 26613
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist