grails-core icon indicating copy to clipboard operation
grails-core copied to clipboard

grails-data-mapping and grails-gsp: New Test Failures post mono-repo

Open jamesfredley opened this issue 8 months ago • 4 comments

Issue description

Prior to being combined into grails-core these other projects were only built with Java 17 and ubuntu-latest. When combines some test failures appears.

The first two can be test on windows with

./gradlew :grails-datamapping-core-test:test --rerun-tasks --no-build-cache

after removing @IgnoreIf( { os.windows } )

https://github.com/apache/grails-core/blob/ac1dd292a8224d3f31efa9cd6b68cb0e84b606db/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/CustomAutoTimestampSpec.groovy#L12-L17

https://github.com/apache/grails-core/blob/ac1dd292a8224d3f31efa9cd6b68cb0e84b606db/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/TckTestSuite.groovy#L13-L17

https://github.com/apache/grails-core/blob/ac1dd292a8224d3f31efa9cd6b68cb0e84b606db/grails-gsp/plugin/src/test/groovy/org/grails/web/taglib/FormTagLibTests.groovy#L40-L45

https://github.com/apache/grails-core/blob/ac1dd292a8224d3f31efa9cd6b68cb0e84b606db/grails-gsp/plugin/src/test/groovy/org/grails/web/taglib/FormTagLibTests.groovy#L316-L320

Additional failures when run locally on windows 11 with Java 17.0.12:

RestfulReverseUrlRenderingTests > testFormTagRendering FAILED
    Condition not satisfied:

    output == '<form action="/book" method="post" name="myForm" id="myForm" >save</form>'
    |      |
    |      false
    |      8 differences (90% similarity)
    |      <form action="/(restfulB)ook" method="post" name="myForm" id="myForm" >save</form>
    |      <form action="/(b-------)ook" method="post" name="myForm" id="myForm" >save</form>
    <form action="/restfulBook" method="post" name="myForm" id="myForm" >save</form>
        at org.grails.web.mapping.RestfulReverseUrlRenderingTests.testFormTagRendering(RestfulReverseUrlRenderingTests.groovy:30)
RestfulReverseUrlRenderingTests > testFormTagRenderGETRequest FAILED
    Condition not satisfied:

    output == '<form action="/book" method="get" name="myForm" id="myForm" >create</form>'
    |      |
    |      false
    |      8 differences (90% similarity)
    |      <form action="/(restfulB)ook" method="get" name="myForm" id="myForm" >create</form>
    |      <form action="/(b-------)ook" method="get" name="myForm" id="myForm" >create</form>
    <form action="/restfulBook" method="get" name="myForm" id="myForm" >create</form>
        at org.grails.web.mapping.RestfulReverseUrlRenderingTests.testFormTagRenderGETRequest(RestfulReverseUrlRenderingTests.groovy:40)

Or alternatively two different failures

testRenderForm
Condition not satisfied:

output == '<form action="/foo" method="post" >bar</form>'
|      |
|      false
|      4 differences (91% similarity)
|      <form action="(----)" method="post" >bar</form>
|      <form action="(/foo)" method="post" >bar</form>
<form action="" method="post" >bar</form>

	at org.grails.web.taglib.LinkRenderingTagLibTests.testRenderForm(LinkRenderingTagLibTests.groovy:228)
testRenderForm
Condition not satisfied:

output == '<form action="/foo" method="post" >bar</form>'
|      |
|      false
|      4 differences (91% similarity)
|      <form action="(----)" method="post" >bar</form>
|      <form action="(/foo)" method="post" >bar</form>
<form action="" method="post" >bar</form>

	at org.grails.web.taglib.LinkRenderingTagLibTests.testRenderForm(LinkRenderingTagLibTests.groovy:228)

jamesfredley avatar Apr 22 '25 00:04 jamesfredley

The gsp tests are covered by https://github.com/apache/grails-core/issues/14319

jdaugherty avatar Apr 22 '25 14:04 jdaugherty

@jdaugherty

./gradlew :grails-datamapping-core-test:test --rerun-tasks --no-build-cache

windows 11 with Java 21.0.6 and @IgnoreIf( { os.windows } ) removed

CustomAutoTimestampSpec > Test when the auto timestamp properties are customized, they are correctly set PASSED
TckTestSuite > Spock > NotInListSpec > test not in list returns the correct results PASSED

Image

jamesfredley avatar Apr 22 '25 15:04 jamesfredley

so its related to the slowness of the windows agents ... we need to address this via reworking the timestamp issues

jdaugherty avatar Apr 22 '25 15:04 jdaugherty

The following two are being addressed in https://github.com/apache/grails-core/pull/14668

grails-core/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/CustomAutoTimestampSpec.groovy grails-core/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/TckTestSuite.groovy

jamesfredley avatar Apr 24 '25 15:04 jamesfredley