Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.0-M2, 2.0-RC1
-
Fix Version/s: 2.0 final
-
Component/s: Testing
-
Environment:HideTested and Fails against 2.0-M2 and recent build snapshots and most recent at eff1a8c. Windows 7 x64 and Windows XP x86. Sun Java 1.6.0_25 and 1.6.0_29. (Also tested with Java 1.7.0 but that seemed to have it's own issues.)
Tested and Passes against same Grails versions, but on Ubuntu 11.04 x64 with Sun Java 1.6.0_26.
Windows Only. Lame I know, but it is the truth.ShowTested and Fails against 2.0-M2 and recent build snapshots and most recent at eff1a8c. Windows 7 x64 and Windows XP x86. Sun Java 1.6.0_25 and 1.6.0_29. (Also tested with Java 1.7.0 but that seemed to have it's own issues.) Tested and Passes against same Grails versions, but on Ubuntu 11.04 x64 with Sun Java 1.6.0_26. Windows Only. Lame I know, but it is the truth.
-
Testcase included:yes
Description
When using @TestMixin(DomainClassUnitTestMixin) and the mockDomain method to mock collaborating domains in a unit test, integration tests that later use a dynamic finder on the mocked domain behave inconsistently.
See issue GRAILS-8176 for some more detail (includes testcase as zip).
See the Environment information for specific environment details.
I have pushed the testcase to github for simplicity. https://github.com/bendoerr/GRAILS-8181-Testcase
You should expect the following failure when running grails test-app against the testcase on a windows environment.
| Completed 4 unit tests, 0 failed in 4262ms | Running 1 integration test... 1 of 1 | Failure: testThatFails(org.grails.bug.DomainIntegrationTests) | Assertion failed: assert Gizmo.findByName(g.name) | | | null | Giz org.grails.bug.Gizmo : 1 at org.grails.bug.DomainIntegrationTests.testThatFails(DomainIntegrationTests.groovy:19) | Completed 1 integration test, 1 failed in 439ms
Would you be able to verify with the current 2.0.1 snapshot if this is still a problem? Build available here:
http://hudson.grails.org/view/Grails%202.0.x/job/grails_core_2.0.x/lastSuccessfulBuild/artifact/build/distributions/grails-2.0.1.BUILD-SNAPSHOT.zip