Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: increase Confirmations e2e stability by terminating ganache on hooks #7287

Merged
merged 3 commits into from
Sep 22, 2023

Conversation

seaona
Copy link
Contributor

@seaona seaona commented Sep 21, 2023

Description

It has been observed that in some Android runs, relative to confirmations, tests were sometimes flaky due to Ganache not terminating properly.
This was not evident on regular runs as only Smoke tests are run (with 1 test using ganache) but it shines in the case you run all the Confirmations e2e (more than 1 test using ganache, needing the server to terminate and start everytime).
(Context)
This change increase confirmations e2e stability by terminating the ganache server in the afterEach hooks instead of inside the withFixtures method.

Manual testing steps

Screenshots/Recordings

Screenshot from 2023-09-21 19-24-56

Before

Intermittent Android failures

After

All runs are passing now in Android

Related issues

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained:
    • What problem this PR is solving.
    • How this problem was solved.
    • How reviewers can test my changes.
  • I’ve indicated what issue this PR is linked to: Fixes #???
  • I’ve included tests if applicable.
  • I’ve documented any added code.
  • I’ve applied the right labels on the PR (see labeling guidelines).
  • I’ve properly set the pull request status:
    • In case it's not yet "ready for review", I've set it to "draft".
    • In case it's "ready for review", I've changed it from "draft" to "non-draft".

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
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-commenter
Copy link

codecov-commenter commented Sep 21, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (ad9793b) 34.43% compared to head (a274ebe) 34.43%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7287   +/-   ##
=======================================
  Coverage   34.43%   34.43%           
=======================================
  Files        1016     1016           
  Lines       27089    27089           
  Branches     2206     2206           
=======================================
  Hits         9329     9329           
  Misses      17267    17267           
  Partials      493      493           

see 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@seaona seaona added the team-confirmations-secure-ux-PR PR from the confirmations team label Sep 21, 2023
@sonarcloud
Copy link

sonarcloud bot commented Sep 21, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@seaona seaona marked this pull request as ready for review September 21, 2023 17:37
@seaona seaona requested a review from a team as a code owner September 21, 2023 17:37
@segun segun changed the title test: increade Confirmations e2e stability by terminating ganache on hooks test: increase Confirmations e2e stability by terminating ganache on hooks Sep 21, 2023
@seaona seaona merged commit 84642e2 into main Sep 22, 2023
29 checks passed
@seaona seaona deleted the test-stability-e2e branch September 22, 2023 06:51
@github-actions github-actions bot locked and limited conversation to collaborators Sep 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants