-
Notifications
You must be signed in to change notification settings - Fork 21
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
Problem Testing Data Services #18
Comments
This check is safe to have in place and makes the problem go away but there is a root problem that the artifact is being mocked multiple times because of the way _artefactInstance is managed in ParameterizedGrailsUnitTest. Related to #18
@jeffbrown Is this issue resolved with 7b4443f ? |
During creation of the dataservices guide, i tried different ways of testing. i came across this issue that jeff had filed. It is true that his project works for the first test and fails for the second, in Grails 3.3.1. However, in grails 3.3.6, the same tests do not work at all. The I created a sample app with this same code that shows it failing. https://github.com/niravassar/dataservice-unit-test This is the error
|
@jeffbrown I am thinking we can close this out, based on the notion that we should use HibernateSpec and/or integration suite to test DataServices. If you agree, let me know. thanks. |
(moving issue from grails/grails-data-mapping#1020 to here)
See https://github.com/jeffbrown/servicetestproblem
Domain:
Data Service:
Unit test:
There is no reason to have a unit test like that of course but this is a simple example that demonstrates the problem. The second test method will fail with the following:
The text was updated successfully, but these errors were encountered: