Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GRAILS-8176: DomainClassUnitTestMixin causes integration test failure #2588

Closed
graemerocher opened this issue Oct 18, 2011 · 4 comments
Closed

Comments

@graemerocher
Copy link
Member

Original Reporter: seeker136
Environment: Tested against 2.0-M2 and snapshot build #1501.
Version: 2.0-M2
Migrated From: http://jira.grails.org/browse/GRAILS-8176

We have been running into problems with the new test framework. In some (strange) scenarios seemingly unrelated tests can cause other tests to fail, even across phase boundaries. In this case, the presence of a unit test utilizing DomainClassUnitTestMixin causes an integration test to fail. Switching to @mock or removing any one of 2 test cases causes the integration test to pass.

This is a really frustrating problem to encounter because it is not always obvious (to me at least) how to tweak the tests to workaround the issue.

@graemerocher
Copy link
Member Author

graemerocher said:
Seems to work fine in git master

@graemerocher
Copy link
Member Author

seeker136 said:
One of my colleagues tested against Git master and was able to reproduce. This seems unlikely to be an environmental issue, but we are running Windows (XP 32bit and 7) and Java 1.6.0_25 and 1.6.0_26. My colleague is spinning up linux VM right now to see he can reproduce the issue.

@graemerocher
Copy link
Member Author

seeker136 said:
Now that I have narrowed down the issue, I was able to replace all instances of @TestMixin(DomainClassUnitTestMixin) + mockDomain() with @mock(....) and all the tests is happy again.

@graemerocher
Copy link
Member Author

seeker136 said:
Confirmed that this issue cannot be reproduced on linux. If you could not reproduce under Linux or Mac, please re-open the ticket and test on Windows. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant