Skip to content

Commit

Permalink
fix(node): E2E test port conflicts (#20826)
Browse files Browse the repository at this point in the history
  • Loading branch information
ndcunningham authored Dec 18, 2023
1 parent bebdf51 commit fbefd06
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions e2e/node/src/node-server.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,14 @@ describe('Node Applications + webpack', () => {
it('should support waitUntilTargets for serve target', async () => {
const nodeApp1 = uniq('nodeapp1');
const nodeApp2 = uniq('nodeapp2');

// Set ports to avoid conflicts with other tests that might run in parallel
runCLI(
`generate @nx/node:app ${nodeApp1} --framework=none --no-interactive`
`generate @nx/node:app ${nodeApp1} --framework=none --no-interactive --port=4444`
);
setMaxWorkers(join('apps', nodeApp1, 'project.json'));
runCLI(
`generate @nx/node:app ${nodeApp2} --framework=none --no-interactive`
`generate @nx/node:app ${nodeApp2} --framework=none --no-interactive --port=4445`
);
setMaxWorkers(join('apps', nodeApp2, 'project.json'));
updateJson(join('apps', nodeApp1, 'project.json'), (config) => {
Expand Down

0 comments on commit fbefd06

Please sign in to comment.