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: Check if fixtures server is running before teardown #7006

Merged
merged 5 commits into from
Aug 18, 2023

Conversation

vinistevam
Copy link
Contributor

@vinistevam vinistevam commented Aug 17, 2023

Development & PR Process

  1. Follow MetaMask Mobile Coding Standards
  2. Add release-xx label to identify the PR slated for a upcoming release (will be used in release discussion)
  3. Add needs-dev-review label when work is completed
  4. Add the appropiate QA label when dev review is completed
    • needs-qa: PR requires manual QA.
    • No QA/E2E only: PR does not require any manual QA effort. Prior to merging, ensure that you have successful end-to-end test runs in Bitrise.
    • Spot check on release build: PR does not require feature QA but needs non-automated verification. In the description section, provide test scenarios. Add screenshots, and or recordings of what was tested.
  5. Add QA Passed label when QA has signed off (Only required if the PR was labeled with needs-qa)
  6. Add your team's label, i.e. label starting with team- (or external-contributor label if your not a MetaMask employee)

Description

This PR aims to improve the tearndown process for fixtures using withFixtures helper function. It was reported that in some cases the retry mechanism was not working and adding a check to ensure that the server is running before stopping it resolved the issue.

  1. Add a check if the fixtures server is started before shutdown and removed the condition of failure.
  2. Move startFixturesServer to only start when required by the test case.

Screenshots/Recordings

http://recordit.co/75fnRudGuN

E2E
Detox:
https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/494c3e27-a418-43eb-916c-21a2cef29998
Wdio:
https://app.bitrise.io/build/611ae3ae-fb84-480f-9952-acade3391b02

Issue

fixes https://github.com/MetaMask/mobile-planning/issues/1196

Checklist

  • There is a related GitHub issue
  • Tests are included if applicable
  • Any added code is fully documented

@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.

@vinistevam vinistevam changed the title improve stop fixtures server test: improve stop fixtures server Aug 17, 2023
@codecov-commenter
Copy link

codecov-commenter commented Aug 17, 2023

Codecov Report

Merging #7006 (a4017ac) into main (c068e9c) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #7006   +/-   ##
=======================================
  Coverage   32.64%   32.64%           
=======================================
  Files         994      994           
  Lines       26641    26641           
  Branches     2088     2088           
=======================================
  Hits         8697     8697           
  Misses      17530    17530           
  Partials      414      414           

@vinistevam vinistevam added the team-confirmations-system DEPRECATED: please use "team-confirmations" label instead label Aug 17, 2023
@vinistevam vinistevam changed the title test: improve stop fixtures server test: checks if fixtures server is running before teardown Aug 17, 2023
@vinistevam vinistevam changed the title test: checks if fixtures server is running before teardown test: Check if fixtures server is running before teardown Aug 18, 2023
@vinistevam vinistevam marked this pull request as ready for review August 18, 2023 05:36
@vinistevam vinistevam requested review from a team as code owners August 18, 2023 05:36
OGPoyraz
OGPoyraz previously approved these changes Aug 18, 2023
Andepande
Andepande previously approved these changes Aug 18, 2023
matthewwalsh0
matthewwalsh0 previously approved these changes Aug 18, 2023
Copy link
Member

@cortisiko cortisiko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🌮 🌮 🌮 🌮

@sonarcloud
Copy link

sonarcloud bot commented Aug 18, 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

warning The version of Java (11.0.20) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

@vinistevam vinistevam merged commit b2a2bfe into main Aug 18, 2023
11 checks passed
@vinistevam vinistevam deleted the fix-fixtures-helper branch August 18, 2023 15:31
@github-actions github-actions bot locked and limited conversation to collaborators Aug 18, 2023
@metamaskbot metamaskbot added the release-7.6.0 Issue or pull request that will be included in release 7.6.0 label Aug 18, 2023
@vinistevam vinistevam added the No QA Needed Apply this label when your PR does not need any QA effort. label Aug 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
No QA Needed Apply this label when your PR does not need any QA effort. release-7.6.0 Issue or pull request that will be included in release 7.6.0 team-confirmations-system DEPRECATED: please use "team-confirmations" label instead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants