Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Support for dynamically allocated stop port #153

Open
eskatos opened this issue Mar 9, 2017 · 0 comments
Open

Support for dynamically allocated stop port #153

eskatos opened this issue Mar 9, 2017 · 0 comments
Labels

Comments

@eskatos
Copy link

eskatos commented Mar 9, 2017

We run integration tests on CI and using fixed ports is not an option because other services/tests may hold them.

Allocating a port up-front is not an option either, it could be taken by something else between the allocation time and it's effective usage.

Setting httpPort and httpsPort to 0 works, they get dynamically allocated and parsing info logs or tomcat logs allow to know which ports were choosen.

But it doesn't work for stopPort, here's the exception:

Caused by: java.lang.IllegalStateException: Bad stop port
	at com.bmuschko.gradle.tomcat.internal.ShutdownMonitor.<init>(ShutdownMonitor.groovy:35)
	at com.bmuschko.gradle.tomcat.tasks.AbstractTomcatRun.startTomcat(AbstractTomcatRun.groovy:363)
	... 101 more

It would be nice if one could set stopPort to 0 so it's dynamically allocated.

I guess the complexity will be in getting tha dynamically allocated port and assign it to the corresponding stop task.

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

No branches or pull requests

2 participants