This is an automated email from the ASF dual-hosted git repository.

jamesfredley pushed a commit to branch improve-gh-ci-speed
in repository https://gitbox.apache.org/repos/asf/grails-core.git


The following commit(s) were added to refs/heads/improve-gh-ci-speed by this 
push:
     new 7cd5005f21 Fix RestfulReverseUrlRenderingTests by ensuring 
grailsApplication is initialized before accessing artefacts
7cd5005f21 is described below

commit 7cd5005f2172e72a30f01577134836707cbdf820
Author: James Fredley <[email protected]>
AuthorDate: Tue Jan 27 04:12:04 2026 -0500

    Fix RestfulReverseUrlRenderingTests by ensuring grailsApplication is 
initialized before accessing artefacts
    
    Same pattern as other fixes: access 'config' in setup() to ensure
    grailsApplication is properly initialized before clearing artefact info.
---
 .../org/grails/web/mapping/RestfulReverseUrlRenderingTests.groovy     | 4 ++++
 1 file changed, 4 insertions(+)

diff --git 
a/grails-gsp/plugin/src/test/groovy/org/grails/web/mapping/RestfulReverseUrlRenderingTests.groovy
 
b/grails-gsp/plugin/src/test/groovy/org/grails/web/mapping/RestfulReverseUrlRenderingTests.groovy
index a438b00e76..e3439a100c 100644
--- 
a/grails-gsp/plugin/src/test/groovy/org/grails/web/mapping/RestfulReverseUrlRenderingTests.groovy
+++ 
b/grails-gsp/plugin/src/test/groovy/org/grails/web/mapping/RestfulReverseUrlRenderingTests.groovy
@@ -31,6 +31,10 @@ import spock.lang.Specification
 class RestfulReverseUrlRenderingTests extends Specification implements 
UrlMappingsUnitTest<RestfulReverseUrlMappings> {
 
     def setup() {
+        // Access config to ensure grailsApplication is initialized and 
Holders is populated.
+        // This is necessary before accessing grailsApplication properties.
+        assert config != null
+        
         // Reset URL mappings to ensure test isolation - clear any mappings 
from previous tests
         // and re-register this test's URL mappings with a fresh holder bean
         if (grailsApplication instanceof grails.core.DefaultGrailsApplication) 
{

Reply via email to