-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Test Statistics Handler #12565
base: jetty-12.1.x
Are you sure you want to change the base?
Test Statistics Handler #12565
Conversation
Removed webapp for deleted Stats servlet Updated module name to at least test deployment
@lorban currently we have not distribution test for the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides the leftover, use DistributionTests.testLimitHandlers()
as an example to deploy demo-simple-webapp
to restore the original testing.
.../test-distribution-common/src/test/java/org/eclipse/jetty/tests/distribution/StatsTests.java
Show resolved
Hide resolved
assertThat(htmlContent, containsString("<em>memory</em>: ")); | ||
assertThat(htmlContent, containsString("</body>")); | ||
assertThat(htmlContent, containsString("</html>")); | ||
// TODO test the StatisticsHandler somehow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could make a couple requests, there already is the one above that returns a 200, and add another one that returns a 404, set dumpBeforeStop
to true, then stop the server and check that the 2xxResponses
and 4xxResponses
counters are part of the dump and have the expected values?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, but would be good to see requests in progress.
|
||
distribution.installBaseResource("stats-webapp-" + env + "/index.html", "webapps/demo/index.html"); | ||
distribution.installBaseResource("stats-webapp-" + env + "/WEB-INF/web.xml", "webapps/demo/WEB-INF/web.xml"); | ||
// TODO add some actual content to it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this TODO can go away, the StatisticsHandler
is installed as the root of the handler tree and there already is a deployed webapp that can be queried to check the stats.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently it is just an empty directory, there is not webapp deployed.
@lorban if you want to take over this one... please do.... otherwise I'll get to it later in the week. |
@gregw I'm now taking this over. |
@lorban status of this one? Are you doing your own branch so I can close this? |
Removed webapp for deleted Stats servlet
Updated module name to at least test deployment