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: use random e2e test ports #23541

Merged
merged 2 commits into from Jul 28, 2022
Merged

Conversation

jbedard
Copy link
Contributor

@jbedard jbedard commented Jul 12, 2022

No description provided.

@jbedard jbedard force-pushed the random-ports branch 2 times, most recently from 8a53863 to c74e33e Compare July 25, 2022 19:45
@jbedard jbedard marked this pull request as ready for review July 27, 2022 02:55
@jbedard jbedard requested a review from alan-agius4 July 27, 2022 02:56
Copy link
Collaborator

@alan-agius4 alan-agius4 left a comment

Choose a reason for hiding this comment

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

@jbedard jbedard changed the title test: use random devserver ports test: use random e2e test ports Jul 27, 2022
@jbedard
Copy link
Contributor Author

jbedard commented Jul 27, 2022

I don't think that catches all cases but looks like it fixes the ones actually using e2e so is probably enough 👍

@jbedard jbedard requested a review from alan-agius4 July 27, 2022 18:00
appTargets.e2e.options.webdriverUpdate = false;
// Use a random port in e2e.
appTargets.e2e.options.port = 0;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@alan-agius4 do you think this would also be the ideal place to set appTargets.serve.options.port? I just had a test running ng serve fail in another PR due to 4200 being in use...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note there's various ng serve --port=0 throughout the tests already but a few are missing such as

rebuild-deps-type-check.ts
rebuild-types.ts

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added another commit but feel free to only merge the first if you'd like.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes we should.

@alan-agius4 alan-agius4 added target: patch This PR is targeted for the next patch release action: merge The PR is ready for merge by the caretaker action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews and removed action: merge The PR is ready for merge by the caretaker labels Jul 28, 2022
@angular angular deleted a comment from ngbot bot Jul 28, 2022
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker merge: squash commits When the PR is merged, a squash and merge should be performed and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels Jul 28, 2022
Copy link
Collaborator

@alan-agius4 alan-agius4 left a comment

Choose a reason for hiding this comment

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

👍

@alan-agius4 alan-agius4 merged commit 35c4357 into angular:main Jul 28, 2022
alan-agius4 pushed a commit that referenced this pull request Jul 28, 2022
* test: use random e2e test ports

* test: use random ng serve ports

(cherry picked from commit 35c4357)
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Aug 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker merge: squash commits When the PR is merged, a squash and merge should be performed target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants