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

Can we switch the port used by PiTest #243

Closed
caligarisdesk opened this issue Dec 23, 2015 · 6 comments
Closed

Can we switch the port used by PiTest #243

caligarisdesk opened this issue Dec 23, 2015 · 6 comments

Comments

@caligarisdesk
Copy link

I noticed that PIT uses port 8092. Unfortunately, when running couchbase through vbox, pitest does not always detect that port 8092 is in use. As a result, pitest hangs.

http://www.speedguide.net/port.php?port=8092

private static final int MIN_PORT_NUMBER = 8091;

I didn't see that one could change the default port used. Can we add this as a parameter?

@caligarisdesk
Copy link
Author

I'm not that familiar with socket libraries, but according to the SO below, should we also check DatagramSocket?

http://stackoverflow.com/questions/434718/sockets-discover-port-availability-using-java

@hcoles
Copy link
Owner

hcoles commented Dec 24, 2015

I think it might be possible to replace the whole thing with new ServerSocket(0).

This would change to port range to something outside of pitest's control so it can't be parameterised, but should push the responsibility for finding an ephemeral port to the JDK.

hcoles added a commit that referenced this issue Dec 24, 2015
@hcoles
Copy link
Owner

hcoles commented Dec 24, 2015

@caligarisdesk I've published a 1.1.8 snapshot, can you let me know if it resolves the issue.

@caligarisdesk
Copy link
Author

Cool, thanks! I'm having trouble pulling down a snapshot build, but as long as the port used keeps changing, it should work well for my configuration.

@hcoles
Copy link
Owner

hcoles commented Jan 2, 2016

@caligarisdesk 1.1.8 has now been released with this change. Can you report back if it has/hasn't resolved the issue.

@caligarisdesk
Copy link
Author

Thanks for the release! Just brought 1.1.8 via the gradle plug-in with the same vagrant/couchbase condition as before. Pitest runs and completes successfully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants