jamesfredley commented on code in PR #15541:
URL: https://github.com/apache/grails-core/pull/15541#discussion_r3030381467


##########
grails-test-core/src/main/groovy/org/grails/plugins/testing/AbstractGrailsMockHttpServletResponse.groovy:
##########
@@ -109,7 +109,7 @@ abstract class AbstractGrailsMockHttpServletResponse 
extends MockHttpServletResp
         final webRequest = GrailsWebRequest.lookup()
         
webRequest?.currentRequest?.removeAttribute(GrailsApplicationAttributes.REDIRECT_ISSUED)
         setCommitted(false)
-        def field = ReflectionUtils.findField(MockHttpServletResponse, 
'writer')
+        def field = ReflectionUtils.findField(MockHttpServletResponse, 
'outputStream')

Review Comment:
   You're right - looking at the Spring source, the field is `writer` (the 
`PrintWriter` field). Fixed - changed it back to `'writer'` to match the actual 
field name in `MockHttpServletResponse`.



##########
grails-test-examples/app1/build.gradle:
##########
@@ -92,4 +92,10 @@ apply {
     from 
rootProject.layout.projectDirectory.file('gradle/functional-test-config.gradle')
     from 
rootProject.layout.projectDirectory.file('gradle/test-webjar-asset-config.gradle')
     from 
rootProject.layout.projectDirectory.file('gradle/grails-extension-gradle-config.gradle')
+}
+
+// Disabled: grails-spring-security plugin is incompatible with Spring Boot 4

Review Comment:
   Done - went with your follow-up suggestion and created a shared gradle file 
`gradle/boot4-disabled-integration-test-config.gradle` that all 6 affected 
test-example projects now apply. This makes it easy to find all disabled 
integration tests and re-enable them in one place.



##########
grails-test-examples/app1/build.gradle:
##########
@@ -92,4 +92,10 @@ apply {
     from 
rootProject.layout.projectDirectory.file('gradle/functional-test-config.gradle')
     from 
rootProject.layout.projectDirectory.file('gradle/test-webjar-asset-config.gradle')
     from 
rootProject.layout.projectDirectory.file('gradle/grails-extension-gradle-config.gradle')
+}
+
+// Disabled: grails-spring-security plugin is incompatible with Spring Boot 4

Review Comment:
   Done - created `gradle/boot4-disabled-integration-test-config.gradle` and 
applied it from all 6 affected build files: app1, app3, exploded, 
plugins/exploded, mongodb/test-data-service, and gsp-sitemesh3.



##########
grails-test-examples/gsp-layout/src/integration-test/groovy/GrailsLayoutSpec.groovy:
##########
@@ -39,6 +40,7 @@ class GrailsLayoutSpec extends ContainerGebSpec {
         pageSource.contains('This is so cool.')
     }
 
+    @Ignore('JSP support removed in Spring Framework 7 - see #15457')

Review Comment:
   Correct - it's the theme support that was removed in Spring Framework 7, not 
JSP support itself. Updated the `@Ignore` reason to: "Theme support removed in 
Spring Framework 7 - JSP demo relies on theme infrastructure". The test fails 
because the JSP demo layout depends on theme resolution which no longer exists, 
not because JSP rendering itself was removed.



##########
grails-test-examples/gsp-layout/src/test/groovy/org/apache/grails/views/gsp/layout/AbstractGrailsTagTests.groovy:
##########
@@ -96,6 +96,10 @@ import static org.junit.jupiter.api.Assertions.fail
 
 abstract class AbstractGrailsTagTests {
 
+    // Theme support was removed in Spring Framework 7.0 - define the 
attribute names directly

Review Comment:
   Done - removed all theme-related code from both copies of 
AbstractGrailsTagTests (gsp-layout and gsp/plugin).



##########
grails-test-examples/gsp-layout/src/test/groovy/org/apache/grails/views/gsp/layout/AbstractGrailsTagTests.groovy:
##########
@@ -282,7 +286,7 @@ abstract class AbstractGrailsTagTests {
         mockManager.registerProvidedArtefacts(grailsApplication)
 
         def mockControllerClass = gcl.parseClass('class MockController {  def 
index = {} } ')
-        ctx = new AnnotationConfigServletWebServerApplicationContext()
+        ctx = new GenericWebApplicationContext()

Review Comment:
   No - the theme infrastructure (`ThemeResolver`, `ThemeSource`, 
`JstlUtils.exposeLocalizationContext` with theme parameter) was completely 
removed from Spring Framework 7.0, not just moved. Including `spring-webmvc` 
doesn't bring it back. The removal was announced as a deprecation in Spring 6.0 
and fully dropped in 7.0.



##########
grails-test-examples/gsp-layout/src/test/groovy/org/apache/grails/views/gsp/layout/AbstractGrailsTagTests.groovy:
##########
@@ -365,8 +369,7 @@ abstract class AbstractGrailsTagTests {
     }
 
     private void initThemeSource(request, MessageSource messageSource) {

Review Comment:
   Done - removed.



-- 
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]

Reply via email to