e2e: when CircleCI hits a Chrome console error, do not cause cascading failures#22660
Merged
e2e: when CircleCI hits a Chrome console error, do not cause cascading failures#22660
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. |
hjetpoluru
approved these changes
Jan 25, 2024
Contributor
hjetpoluru
left a comment
There was a problem hiding this comment.
LGTM! I've tested it locally and its working.
Collaborator
Builds ready [8633291]
Page Load Metrics (831 ± 31 ms)
Bundle size diffs
|
8633291 to
ac3d8b7
Compare
Collaborator
Builds ready [ac3d8b7]
Page Load Metrics (751 ± 13 ms)
Bundle size diffs
|
ac3d8b7 to
929fd58
Compare
Collaborator
Builds ready [929fd58]
Page Load Metrics (765 ± 24 ms)
Bundle size diffs
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #22660 +/- ##
========================================
Coverage 68.08% 68.08%
========================================
Files 1091 1091
Lines 42923 42923
Branches 11415 11415
========================================
Hits 29223 29223
Misses 13700 13700 ☔ View full report in Codecov by Sentry. |
legobeat
approved these changes
Jan 30, 2024
8 tasks
Collaborator
Builds ready [3bdd875]
Page Load Metrics (804 ± 27 ms)
Bundle size diffs
|
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
This PR fixes two related bug reports:
add-custom-network.spec.jscan have one test crash from a Chrome error, and then the rest of the tests in that file automatically fail withlisten EADDRINUSE: address already in use 127.0.0.1:8545Method to fix:
Warning:as these shouldn't be causing test failures anywaythrow new Error()used to be insidedriver.logBrowserError(), but that function is running inside the callbackthis.driver.onLogEvent(), and not in the main test thread. It now checks for and throws the Error in the main test thread, afterawait testSuite()but beforeconsole.log(`\nSuccess on testcase: '${title}'\n`);.yarn start:test, but now it supportsyarn build:testtoo (this was an oversight of mine in the past)Related issues
Manual testing steps
yarn test:e2e:single test/e2e/tests/add-custom-network.spec.js --browser=chrome --debug --leave-runninghttps://app.circleci.com/pipelines/github/MetaMask/metamask-extension/67735/workflows/0526cea0-229f-4e20-a4d4-924eb254b1e1/jobs/2231422
https://app.circleci.com/pipelines/github/MetaMask/metamask-extension/67719/workflows/96dfd8ad-d1c8-4272-ad73-c4c317d11739/jobs/2230668
https://app.circleci.com/pipelines/github/MetaMask/metamask-extension/67713/workflows/7cf3be9d-aefb-4845-805a-29aa55cd2e28/jobs/2230339
https://app.circleci.com/pipelines/github/MetaMask/metamask-extension/67692/workflows/0ca31731-d197-4b1d-9d4c-100ddaaf5ea4/jobs/2229290
https://app.circleci.com/pipelines/github/MetaMask/metamask-extension/67740/workflows/3c079482-e7f6-4ce9-9073-e2ae6f1dc27c/jobs/2231757
If it gets one console error, then retries and succeeds, it should pass.
See this run where it hits 'Deliberate Chrome Error', then retries and succeeds:
https://app.circleci.com/pipelines/github/MetaMask/metamask-extension/67855/workflows/ded22e99-e7e9-4bc2-8fd3-1fd7cd8f2c02/jobs/2237475/parallel-runs/12/steps/12-105
Screenshots/Recordings
Pre-merge author checklist
Pre-merge reviewer checklist