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

Issue #5798 fix jetty runner startup error and add jsp support as well #6115

Merged
merged 5 commits into from
Apr 27, 2021

Conversation

olamy
Copy link
Member

@olamy olamy commented Mar 30, 2021

No description provided.

@olamy olamy added the Bug For general bugs on Jetty side label Mar 30, 2021
@joakime joakime requested a review from janbartel April 12, 2021 13:52
</plugin>
</plugins>
</build>
</project>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@olamy would any of this test setup be simplified at all if it moved over into tests/test-runner instead? The integration test setup is impressive, but looks really complex.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could be but it will be simply the same poms etc... move to tests/test-runner.
What if we want to add more tests? I don't want to turn having tests/test-runner-2 etc...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This uses the jetty-runner.jar as built, and without the maven classloader causing false success.
Does tests/test-runner satisfy these 2 (kinda important) aspects of testing jetty runner?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will only move this IT test as a simple project under tests/test-runner. But I don't like it. I prefer this structure using the invoker plugin within jetty-runner project.

@olamy olamy requested a review from joakime April 14, 2021 02:39
Signed-off-by: olivier lamy <[email protected]>
@olamy
Copy link
Member Author

olamy commented Apr 21, 2021

@joakime nudge

Copy link
Contributor

@joakime joakime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can be improved.

@@ -164,6 +170,7 @@ public void usage(String error)
System.err.println(" --out file - info/warn/debug log filename (with optional 'yyyy_mm_dd' wildcard");
System.err.println(" --host name|ip - interface to listen on (default is all interfaces)");
System.err.println(" --port n - port to listen on (default 8080)");
System.err.println(" --port-file path - file to write a single line with the port used to serve http requests ");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be more than just the port.
It should likely contain the value of Server.getURI() (after Server.start())so that the scheme + network address + port + context path are all communicated.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would --server-uri-file path be a better option?

HttpClient httpClient = new HttpClient();
try
{
httpClient.start();
ContentResponse response =
httpClient.newRequest("localhost", port).path("/").send();
ContentResponse response = httpClient.newRequest(serverUri).send();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep in mind that the serverUri will contain the contextPath of the first ContextHandler, if it isn't / then you'll need to URI.create(serverUri).resolve("/") to use the path at root.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but here we have only one war deployed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesting the documentation says [[--path /path] context]*n but looking at the code we do not support this n ;)

@olamy olamy merged commit cda38ab into jetty-10.0.x Apr 27, 2021
@olamy olamy deleted the jetty-10.0.x_jetty_runner_startup_error branch April 27, 2021 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For general bugs on Jetty side
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants