6

Running our tests locally (OSX) with gradle test the run/pass just fine. On our CI (Ubuntu 16.04 LTS) machine we're running into an issue with the application context

java.lang.IllegalStateException: Could not find ApplicationContext, configure Grails correctly first
        at grails.util.Holders.getApplicationContext(Holders.java:97)

Checking the versions shows they are identical on both machines

/grailsw -version
| Grails Version: 3.2.8
| Groovy Version: 2.4.7
| JVM Version: 1.8.0_131


./gradlew -version
Gradle 3.5
Build time:   2017-04-10 13:37:25 UTC
Revision:     b762622a185d59ce0cfc9cbc6ab5dd22469e18a6
Groovy:       2.4.10
Ant:          Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM:          1.8.0_131 (Oracle Corporation 25.131-b11)
OS:           Linux 3.13.0-100-generic amd64`

Are there some other dependencies I should be looking into?

TheAntonioReyes
  • 301
  • 1
  • 4

1 Answers1

0

I believe the reason for that is how you are starting your tests. Please use local Gradle wrapper instead of version installed on the machine itself to ensure consistency between those two build - here you can find more information.

So basically instead of running gradle test run it with ./gradlew test

netsatan
  • 1
  • 2