Grails3 controller and service tests failing


#1

Anybody have experience with grails 3.x setup?
My grails’ Controller and Service tests fail with grailsconfiguration errors on circleci, but all the POJO classes pass.

On localhost, all tests pass with the same command.

./grailsw dev test-app

grails 3.1.14


#2

For the most part, grails 3 is working just fine for us in circleci, both with ./grailsw and with gradle. However, we just encountered an issue where a specific service didn’t get the bean injection that we were expecting.
We had def fooBarService that was defined in Resources.groovy and then we were using that fooBarService. It was working just fine on our machines but on circleci and only there, the fooBarService was null.

We tried to identify the issue by injection GrailsApplication but that too was null. So we worked around the issue by using Holders.getGrailsApplication().mainContext.fooBarService.method() and that is working fine.

If this is not related to your issue, you might want to give more information as to the exact error you’re getting.


#3