Skip to content

test: Fix flaky e2e signature tests#26771

Merged
pnarayanaswamy merged 6 commits intodevelopfrom
fix-flaky-e2e
Aug 30, 2024
Merged

test: Fix flaky e2e signature tests#26771
pnarayanaswamy merged 6 commits intodevelopfrom
fix-flaky-e2e

Conversation

@pnarayanaswamy
Copy link
Copy Markdown
Contributor

@pnarayanaswamy pnarayanaswamy commented Aug 29, 2024

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.

Open in GitHub Codespaces

Related issues

Fixes: #26760 #26761 26610 26613

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@github-actions
Copy link
Copy Markdown
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.

@github-actions github-actions bot added the team-confirmations Push issues to confirmations team label Aug 29, 2024
@pnarayanaswamy pnarayanaswamy marked this pull request as ready for review August 29, 2024 19:14
@pnarayanaswamy pnarayanaswamy requested a review from a team as a code owner August 29, 2024 19:14
@pnarayanaswamy pnarayanaswamy changed the title test: Fix flaky e2e signature metrics tests test: Fix flaky e2e signature tests Aug 29, 2024
@sonarqubecloud
Copy link
Copy Markdown

@codecov
Copy link
Copy Markdown

codecov bot commented Aug 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.13%. Comparing base (1b4417d) to head (42f3913).

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.
📢 Have feedback on the report? Share it here.

@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [42f3913]
Page Load Metrics (1791 ± 82 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint22921901620488234
domContentLoaded15492182177816881
load15572192179117082
domInteractive167234115
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@pnarayanaswamy pnarayanaswamy merged commit ddf93de into develop Aug 30, 2024
@pnarayanaswamy pnarayanaswamy deleted the fix-flaky-e2e branch August 30, 2024 10:10
@github-actions github-actions bot locked and limited conversation to collaborators Aug 30, 2024
@metamaskbot metamaskbot added the release-12.6.0 Issue or pull request that will be included in release 12.6.0 label Aug 30, 2024
@gauthierpetetin gauthierpetetin added release-12.5.0 Issue or pull request that will be included in release 12.5.0 and removed release-12.6.0 Issue or pull request that will be included in release 12.6.0 labels Sep 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-12.5.0 Issue or pull request that will be included in release 12.5.0 team-confirmations Push issues to confirmations team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix "Confirmation Signature - SIWE @no-mmi initiates and ..." flaky tests

5 participants