jdaugherty commented on PR #15465:
URL: https://github.com/apache/grails-core/pull/15465#issuecomment-4320074107

   From my AI Results: 
   
         1. Generic test-isolation fix at the Spock extension level             
                                                                                
                                                          
                                                                                
                                                                                
                                                            
           Tests using UrlMappingsUnitTest no longer need per-test cleanup 
boilerplate. The fix lives in three places:                                     
                                                                 
                                                                                
                                                                                
                                                            
           - 
grails-testing-support-web/src/main/groovy/grails/testing/web/UrlMappingsUnitTest.groovy
 — mockArtefact() now clears artefactInfo and destroys the cached 
grailsUrlMappingsHolder singleton before
           re-registering. Added resetUrlMappingsForFeature() and 
cleanupUrlMappingsAfterFeature() helpers.                                       
                                                                          
           - 
grails-testing-support-web/src/main/groovy/org/grails/testing/spock/UrlMappingSetupSpecInterceptor.groovy
 — now handles both setupSpec (mocking controllers) and setup (re-registering 
URL mappings before each
            feature method).                                                    
                                                                                
                                                            
           - 
grails-testing-support-web/src/main/groovy/org/grails/testing/spock/UrlMappingCleanupInterceptor.groovy
 (new) — clears the URL mapping artefact registry after each feature method so 
non-UrlMappingsUnitTest
           specs running later in the same JVM don't inherit foreign mappings.  
                                                                                
                                                            
           - 
grails-testing-support-web/src/main/groovy/org/grails/testing/spock/WebTestingSupportExtension.groovy
 — wires the new setup/cleanup interceptors.
           - 
grails-gsp/plugin/src/test/groovy/org/grails/web/mapping/RestfulReverseUrlRenderingTests.groovy
 — removed the now-redundant per-test setup/cleanup workaround.                 
                                
                                                       


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