WW-5734 test(jasperreports7): run the plugin end-to-end on an embedded Tomcat - #1924
Merged
Conversation
…d Tomcat The plugin had never been exercised outside Spring's mock response, which is how WW-5731, WW-5732 and WW-5733 went unnoticed since 7.1.0. The showcase cannot host an example because JasperReports is LGPL and the showcase WAR ships in the release assembly. JasperReport7TomcatTest boots Struts on tomcat-embed-core (test scope), compiles the existing simple.jrxml into the webapp's docBase and asserts that a real HTTP request returns a non-empty body of the right content type for each of the six bundled formats. Against the providers as they were before WW-5733 all six assertions fail with an empty body. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Fixes WW-5734
Why
The jasperreports7 plugin had never been exercised outside Spring's
MockHttpServletResponse— no sample app uses it — which is how WW-5731, WW-5732 and WW-5733 (every export an empty200on Tomcat) shipped unnoticed since 7.1.0. The showcase can't host an example: JasperReports is LGPL and the showcase WAR is part of the release assembly (the previous example was removed for that reason in 2006).What
JasperReport7TomcatTestboots Struts ontomcat-embed-core(test scope, 10.1.55, bound to 127.0.0.1 on a random port), compiles the existingsimple.jrxmlinto the webapp's docBase undertarget/, and issues a real HTTPGET /report.action?format=…for each of the six bundled formats, asserting status, content type and payload (%PDF,{\rtf,PK, or the rendered text). Runs in ~1 s as part of the module's normal surefire run, under both the default and thejakartaee11profile.With the exporter providers reverted to their pre-WW-5733 state, all six assertions fail with an empty body — the real container symptom the mock could not show.
Test-only change: nothing here reaches the plugin jar or the assembly (
runtimedependency sets), and the OWASP profile skips test scope.🤖 Generated with Claude Code