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

getFreeRandomPort() should work for httpsPort #85

Closed
jzheaux opened this issue Nov 8, 2018 · 3 comments
Closed

getFreeRandomPort() should work for httpsPort #85

jzheaux opened this issue Nov 8, 2018 · 3 comments
Assignees

Comments

@jzheaux
Copy link

jzheaux commented Nov 8, 2018

Doing

gretty {
    httpPort = getRandomFreePort()
}

is super-convenient for integration tests.

Is there any reason that it is not supported for HTTPS?

For example, in TomcatServerConfigurer, it checks the httpPort property, but not the httpsPort property.

@javabrett
Copy link
Member

I'm not immediately aware of why this wouldn't be possible. So a PR would be gratefully accepted if you get that working.

jzheaux added a commit to jzheaux/gretty that referenced this issue Nov 9, 2018
Gretty already supports setting httpPort to getRandomFreePort and this
commit adds the same support to httpsPort as well as introducing some
testing for both.

Fixes: gretty-gradle-plugingh-85
@jzheaux
Copy link
Author

jzheaux commented Nov 9, 2018

Sure, @javabrett.

Any possibility of backporting to the 2.x release train?

@javabrett
Copy link
Member

Yes this was committed to the 2.x branch then merged to master.

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