-
Notifications
You must be signed in to change notification settings - Fork 81
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
Randomize port #89
Comments
Even with randomized ports there's still a possibility that two different builds pick the same port. Why not simply specify a fixed, different port for each project on the CI? |
Sure it's possible to have a collision with a random port, but it's pretty unlikely. Most of the time the port is not strictly random. A short check to ensure the port is free saves us from conflicts (see https://github.com/johnbintz/jasmine-headless-webkit/blob/master/lib/jasmine/headless/runner.rb#L50-L77 as an example). We never had a collision using JHW and we regularly had 12-20 projects on a machine integrating with a concurrency of 3-4. We're migrating to guard-jasmine (and friends) from JHW because it's better supported. It's nice to be able to use guard-jasmine out of the box without having to pick a unique port and hardcode it in the project's configuration. This feature request is in the spirit of my last, which was to autodetect your app server instead of defaulting to webrick (#82). Why configure something when a better solution exists that doesn't require configuration? |
Agree. Randomizing the server port makes guard-jasmine handle concurrent builds on the same box work out of the box. Version 1.10.0 released. |
Thanks! |
We're starting to use guard-jasmine on multiple projects, all of which are running on the same CI instance. When two builds run at the same time we see intermittent failures because of port collisions.
Have you considered randomizing the port that's used?
The text was updated successfully, but these errors were encountered: