RemoLiechti commented on code in PR #53:
URL:
https://github.com/apache/sling-org-apache-sling-engine/pull/53#discussion_r1834546487
##########
src/test/java/org/apache/sling/engine/impl/SlingHttpServletResponseImplTest.java:
##########
@@ -90,12 +134,14 @@ public void testContentMethods() {
Mockito.verify(orig, never()).setLocale(null);
Mockito.verify(orig, never()).setBufferSize(4500);
- verify(requestProgressTracker, times(1))
- .log(String.format(
- "ERROR: Servlet %s tried to override the
'Content-Type' header from 'null'"
- + " to 'text/plain'. This is a violation of
the RequestDispatcher.include() contract -"
- + "
https://jakarta.ee/specifications/servlet/4.0/apidocs/javax/servlet/requestdispatcher#include-javax.servlet.ServletRequest-javax.servlet.ServletResponse-.",
- ACTIVE_SERVLET_NAME));
+ ArgumentCaptor<String> logCaptor =
ArgumentCaptor.forClass(String.class);
+ verify(requestProgressTracker, times(1)).log(logCaptor.capture());
+ String logMessage = logCaptor.getValue();
+ assertEquals(
+ String.format(
Review Comment:
Commented on
[SLING-12478](https://issues.apache.org/jira/browse/SLING-12478) for reasoning.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]