Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: flaky test ` onboarding @no-mmi doesn't make any network request…
…s to infura before onboarding is completed/test-failure-screenshot-1.png` timeout (#25525) <!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** This test appears flaky as sometimes not all the requests are made when we finish the onboarding. Notice how, we mock 5 requests, but in the logs, only 4 appear after the onboarding. Specifically the `net_version` request doesn't happen in this case. [EDIT] It seems that the explanation for this is what @HowardBraham mentions below: since we mock the balance as non-zero, the wallet keeps querying the balance for the subsequent accounts. This could be that causes the wallet to enter in a non-finishing loop, and the `net_version` request is also never triggered (see this should happen after the `eth_call`) ![image](https://github.com/MetaMask/metamask-extension/assets/54408225/291d94f5-e0aa-4ff9-b96b-46c8bcdd7cc8) [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/25525?quickstart=1) ## **Related issues** Fixes: #25543 ## **Manual testing steps** 1. Check ci ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ![Screenshot from 2024-06-26 15-05-52](https://github.com/MetaMask/metamask-extension/assets/54408225/93a9d29c-10ca-479d-9e67-e76c46c23fb8) ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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.
- Loading branch information