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

fix: fixed issue with CT + electron + run mode not exiting properly #25585

Merged
merged 6 commits into from
Jan 25, 2023

Conversation

mschile
Copy link
Contributor

@mschile mschile commented Jan 25, 2023

Additional details

Removed unneeded code that was causing component tests to hang in electron when running multiple specs in run mode.

Prior to d1dc125, after running the first spec in electron, the browser instance is cleared and never set again even after a new spec is started. When openProject.closeBrowser() was called, the instance was null and the promise resolved.

After d1dc125, after running the first spec in electron, the browser instance is cleared but then it is set to the new browser instance when the new spec is started. The instance is not cleared again after that. Thus, when openProject.closeBrowser() was called, the instance was not null and the promise never resolved causing the hang.

Steps to test

  • Run multiple component specs in run mode in electron and verify the process is correctly exited.

How has the user experience changed?

PR Tasks

  • Have tests been added/updated?
  • Has the original issue (or this PR, if no issue exists) been tagged with a release in ZenHub? (user-facing changes only)
  • [n/a] Has a PR for user-facing changes been opened in cypress-documentation?
  • [n/a] Have API changes been updated in the type definitions?

@AtofStryker AtofStryker self-requested a review January 25, 2023 22:17
@cypress
Copy link

cypress bot commented Jan 25, 2023

47 flaky tests on run #43454 ↗︎

0 26600 1274 0 Flakiness 47

Details:

updates
Project: cypress Commit: cc30220ebb
Status: Passed Duration: 19:40 💡
Started: Jan 25, 2023 10:25 PM Ended: Jan 25, 2023 10:44 PM
Flakiness  commands/net_stubbing.cy.ts • 1 flaky test • 5x-driver-firefox

View Output Video

Test
network stubbing > intercepting request > can delay and throttle a StaticResponse
Flakiness  e2e/origin/commands/waiting.cy.ts • 1 flaky test • 5x-driver-firefox

View Output Video

Test
cy.origin waiting > alias > waits for the route alias to have a response
Flakiness  e2e/origin/commands/assertions.cy.ts • 1 flaky test • 5x-driver-firefox

View Output Video

Test
cy.origin assertions > #consoleProps > .should() and .and()
Flakiness  cypress/cypress.cy.js • 3 flaky tests • 5x-driver-firefox

View Output Video

Test
... > correctly returns currentRetry
... > correctly returns currentRetry
... > correctly returns currentRetry
Flakiness  create-from-component.cy.ts • 1 flaky test • app-e2e

View Output Video

Test
... > runs generated spec Screenshot

The first 5 flaky specs are shown, see all 23 specs in Cypress Cloud.

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@@ -814,10 +814,6 @@ async function runSpecs (options: { config: Cfg, browser: Browser, sys: any, hea
})),
})

if (testingType === 'component') {
Copy link
Contributor

Choose a reason for hiding this comment

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

E2E and CT should be closing the browser equivalently so this removal looks good to me!

@mschile mschile merged commit 2cbc2ff into develop Jan 25, 2023
@mschile mschile deleted the mschile/component_exit_fix branch January 25, 2023 23:01
tgriesser added a commit that referenced this pull request Jan 26, 2023
* develop: (27 commits)
  refactor: remove unused cloud routes (#25584)
  chore: fix issue template formatting issue (#25587)
  fix: fixed issue with CT + electron + run mode not exiting properly (#25585)
  chore(deps): update dependency ua-parser-js to v0.7.33 [security] (#25561)
  fix: add alternative binary names for edge-beta (#25456)
  chore: add batch execution to CloudDataSource (#22457)
  chore: End a/b campaigns for aci smart banners (#25504)
  chore: release @cypress/schematic-v2.5.0
  fix(cypress-schematic): do not disable e2e support file (#25400)
  chore: adding memory issue template (#25559)
  feat: Add Angular CT Schematic (#24374)
  chore: enforce changelog entries on PR reviews (#25459)
  chore: bump package.json to 12.4.0 [run ci] (#25556)
  feat: Add 'type' option to `.as` to store aliases by value (#25251)
  chore: release @cypress/webpack-dev-server-v3.2.3
  feat: Display line break in cy.log (#25467)
  chore: update types (#25538)
  fix: Revert "fix: adding emergency garbage collection for chromium-based browsers" (#25546)
  fix: percy - wait to take snapshot until previous tooltips are gone (#25522)
  feat: support data-qa selector in selector playground (#25475)
  ...
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jan 27, 2023

Released in 12.4.1.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v12.4.1, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Jan 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cypress 12.4.0: cypress run --component fails to terminate at end of tests
4 participants