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

e2e test should exit with -1 if devServerTarget failed #22272

Open
1 task done
robertIsaac opened this issue Mar 12, 2024 · 1 comment
Open
1 task done

e2e test should exit with -1 if devServerTarget failed #22272

robertIsaac opened this issue Mar 12, 2024 · 1 comment
Assignees
Labels
scope: testing tools Issues related to Cypress / Jest / Playwright / Vitest support in Nx type: feature

Comments

@robertIsaac
Copy link
Contributor

robertIsaac commented Mar 12, 2024

Description

right now if the devServerTarget of the e2e fails, the e2e stay hanging forever (till it timeout in the CI)
it wastes our resources a lot in our CI, because normally it takes 45 mins to complete, we notice the error usually when it pass 1 hour

Motivation

it will save our resources in the CI

Suggested Implementation

to check if the devServerTarget has errors, if it does to exit with -1 immediately

Alternate Implementations

nothing

additional information

this happen with us because of this bug in Angular angular/angular-cli#27167
there is nothing we could do to make sure the server will actually serve, because we could easily add the build step before the e2e to make sure the code is valid, but it doesn't guarantee the serve will actually work

@FrozenPandaz FrozenPandaz added the scope: testing tools Issues related to Cypress / Jest / Playwright / Vitest support in Nx label Mar 15, 2024
@robertIsaac
Copy link
Contributor Author

hi @FrozenPandaz
it seems in native angular setting watch to false will make the server exit, but with nx it doesn't
supporting the same implementation as Angular for watch will fix the problem
minimum reproduce is to create a new nx project using angular, remove something to break the application and run nx serve --no-watch
in native angular it will fail and exit with -1
in nx angular it will fail and stuck

if you don't have the time, just point me to where to make the change and I will create the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: testing tools Issues related to Cypress / Jest / Playwright / Vitest support in Nx type: feature
Projects
None yet
Development

No branches or pull requests

3 participants