You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A NPE in unit tests when calling services that use new RestBuilder() and that use the default JSON marshalling as this will get invoked and then cause NPE on getConfig() on this line: [https://github.com/grails/grails-core/blob/fea97e8624b9428d7e987dce41a037d12004d409/grails-plugin-converters/src/main/groovy/org/grails/web/converters/configuration/ConvertersConfigurationInitializer.java#L98]
Previously in the 3.0.x branch this would work okay due to how the config was initialized. I attempting to rework the tests to accommodate this change, but I am having now luck.
The exception starts from the call to def rest = new RestBuilder()
Grails 3.1.0
JDK 1.8u72
When setting the grailsApplication via ConvertersConfigurationInitializer.metaClass.grailsApplication = grailsApplication then a new issue arrises where cacheContext throws a MissingPropertyException at [https://github.com/grails/grails-core/blob/970a95981a7bc83ed9d3b600866895a1cfb8c607/grails-plugin-testing/src/main/groovy/grails/test/runtime/GrailsApplicationTestPlugin.groovy#L342] Although this appears to be caught and ignored.
The text was updated successfully, but these errors were encountered:
A NPE in unit tests when calling services that use new RestBuilder() and that use the default JSON marshalling as this will get invoked and then cause NPE on getConfig() on this line: [https://github.com/grails/grails-core/blob/fea97e8624b9428d7e987dce41a037d12004d409/grails-plugin-converters/src/main/groovy/org/grails/web/converters/configuration/ConvertersConfigurationInitializer.java#L98]
Previously in the 3.0.x branch this would work okay due to how the config was initialized. I attempting to rework the tests to accommodate this change, but I am having now luck.
The exception starts from the call to
def rest = new RestBuilder()
Grails 3.1.0
JDK 1.8u72
When setting the grailsApplication via
ConvertersConfigurationInitializer.metaClass.grailsApplication = grailsApplication
then a new issue arrises where cacheContext throws a MissingPropertyException at [https://github.com/grails/grails-core/blob/970a95981a7bc83ed9d3b600866895a1cfb8c607/grails-plugin-testing/src/main/groovy/grails/test/runtime/GrailsApplicationTestPlugin.groovy#L342] Although this appears to be caught and ignored.The text was updated successfully, but these errors were encountered: