Error while running integration Grails test on my linux build server
I got a very annoying error while I was building my grails application on my hudson build server. It took a while to figure out why this was happening. At the end the solution was very easy and iI wold like to share here my lessen learned learned.
This was the original error message while running my integration tests.
| Error 2012-10-31 10:17:12,127 [main] ERROR plugins.DefaultGrailsPluginManager - Error configuring dynamic methods for plugin [resources:1.1.6]: Assertion failed: assert f.delete() | | | false /tmp/grails-resources/js/application.js Message: Assertion failed: assert f.delete() | | | false /tmp/grails-resources/js/application.js Line | Method ->> 105 | doCall in _GrailsBootstrap_groovy$_run_closure2_closure17 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 97 | doCall in _GrailsBootstrap_groovy$_run_closure2 | 131 | doCall in _GrailsBootstrap_groovy$_run_closure6 | 334 | doCall in _GrailsTest_groovy$_run_closure9 | 192 | doCall in _GrailsTest_groovy$_run_closure1_closure21 | 184 | doCall in _GrailsTest_groovy$_run_closure1 ^ 82 | doCall in TestApp$_run_closure1
So what is the issue?
After finding the solution its easy: The file /tmp/grails-resources/js/application.js could not be deleted.
So it was a permission issue. I had started the tests as a normal system user before. Now the test is started from my tomcat7 user managing my hudson buildserver and this user was not able to delete the file in the /tmp directory.
Fixing the permissions was the only thing needed to get the integration tests working again.