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

Allow automatic port selection by tomcat #116

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

pschwarzer-tt
Copy link

@pschwarzer-tt pschwarzer-tt commented Nov 11, 2021

Short description of what this resolves:

As discussed in here: #115 here the pull request to allow automatic port selection by the arquillian tomcat plugin.

I added comments to all done changes.

Changes proposed in this pull request:

  • allow automatic port selection by Tomcat class

Fixes: #

  • changed final HTTPContext httpContext = new HTTPContext(configuration.getBindAddress(), configuration.getBindHttpPort()); to new HTTPContext(tomcat.getHost().getName(), tomcat.getConnector().getLocalPort()); in Tomcat8EmbeddedContainer.java so HTTPContext uses port choosen by Tomcat, and no longer set by user in configuration. This allows setting of 0 and to let tomcat choose an available port by its own.

  • changed ((StandardHost) host).setUnpackWARs(configuration.isUnpackArchive()); back to embeddedHostConfig.setUnpackWARs(configuration.isUnpackArchive()); because in out arquillian setup, ((StandardHost) host).setUnpackWARs(configuration.isUnpackArchive()); will not work propably

@rhusar rhusar self-assigned this Mar 12, 2024
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

Successfully merging this pull request may close these issues.

3 participants