-
Notifications
You must be signed in to change notification settings - Fork 12k
run e2e tests in isolated child processes #23245
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
Conversation
790a1a9
to
bd671ea
Compare
tests/legacy-cli/e2e_runner.ts
Outdated
for (const [initializerIndex, initializer] of allInitializers.entries()) { | ||
printSetupHeader(initializer, initializerIndex, allInitializers.length, 'initializer'); | ||
|
||
await runInitializer((lastTestRun = initializer)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: comment that runInitializer
runs ng init
and creates test-project
b527198
to
4558799
Compare
89cb1d1
to
e0f1c5c
Compare
8742c1d
to
60f0ec9
Compare
1424022
to
317f948
Compare
db25a5b
to
d0548d6
Compare
This appears to be causing failures for the full Windows CI job and the snapshots job: |
Any ideas here? Should that folder be gitignored and not be cleaned anyway? |
I'll look into the snapshot ones more this morning. What is run which wasn't run on the PR CI? |
#23311 should fix the snapshot job. Windows will require more investigation though. These are the jobs that are only run on main (Windows has a subset run on PRs):
|
I briefly took a look from my mobile, what is strange is that the files not being removed are ng-packagr cache files, which strangely isn’t even run in the failings tests. Have these been left overs from previous tests? I also noticed that some other tests are failing with task kill related errors
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Note I'd like to merge #23130 first.DONEThis is to stop mixing the angular-cli test-runner environment with the cli environments being tested. Essentially launching each test in a subprocess to a) not mix with the test-runner PATH, npm modules etc, b) prevent environment (vars, cwd, ...) side effects from one test effecting the next tests or the test-runner.
Prefactor commits (can be merged on their own ahead of time instead of squashing):
Wait forEDIT: was done in f70557akillAllProcesses
to actually complete before proceeding. Killing a procedure is async but was not being await-ed. This creates race conditions but once tests are run in a subprocess those are far more likely (the subprocess dies before killing subprocesses completes)..then
.Main change:
puppeteer
now need to be installed within the sandboxed test environment (previously it was using the one in the git repo node_modules). Theprotractor
used in the tests is now the correct one in the test project node_modules (not the one the cli git repo node_modules), sowebdriver-manager
must now run on that test project and not only the git repo.Overview: