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

matrei pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/grails-core.git


The following commit(s) were added to refs/heads/7.0.x by this push:
     new 94e5ca0dc7 test: fix flakiness in `ReservedWordOverrideTests` (#14752)
94e5ca0dc7 is described below

commit 94e5ca0dc7d010b340dad799c4eba706d7763f31
Author: Mattias Reichel <mattias.reic...@gmail.com>
AuthorDate: Sat May 17 13:59:53 2025 +0200

    test: fix flakiness in `ReservedWordOverrideTests` (#14752)
    
    The test failed intermittently when the `toString()` of `pageScope`
    produced a string containing the word 'bad'. This is a valid
    hexadecimal value that can appear in the default `toString()`
    representation (e.g., `ClassName@17224bad`), causing the test
    to fail unexpectedly. The test has been updated to avoid
    relying on fragile string patterns.
---
 .../groovy/org/grails/web/pages/ReservedWordOverrideTests.groovy     | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git 
a/grails-gsp/plugin/src/test/groovy/org/grails/web/pages/ReservedWordOverrideTests.groovy
 
b/grails-gsp/plugin/src/test/groovy/org/grails/web/pages/ReservedWordOverrideTests.groovy
index 25e203f88e..2b9ff11d9c 100644
--- 
a/grails-gsp/plugin/src/test/groovy/org/grails/web/pages/ReservedWordOverrideTests.groovy
+++ 
b/grails-gsp/plugin/src/test/groovy/org/grails/web/pages/ReservedWordOverrideTests.groovy
@@ -25,10 +25,11 @@ import org.junit.jupiter.api.Test
  * @author Graeme Rocher
  * @since 1.0
  */
-class ReservedWordOverrideTests extends AbstractGrailsTagTests{
+class ReservedWordOverrideTests extends AbstractGrailsTagTests {
 
     @Test
     void testCannotOverrideReservedWords() {
-        assertOutputNotContains "bad", '${pageScope}', [pageScope:"bad"]
+        def expected = 'terrible'
+        assertOutputNotContains(expected, '${pageScope}', [pageScope: 
expected])
     }
 }
\ No newline at end of file

Reply via email to