If you’ve got a test that passes when run by itself but fails when run with the rest of the tests in your test suite, you’ve almost definitely got a test pollution problem. Test pollution happens when the results of … Continued
metaprogramming
Better Grails Batch Import Performance with Redis and Jesque
A couple of years ago, I put up a well-received blog post on tuning Batch Import Performance with Grails an MySQL. I’ve recently needed to revisit some batch importing procedures and have acquired a few extra tools in my Grails … Continued
Dynamically setting Grails Log4J levels with the Console Plugin
If you’ve got Burt Beckwith’s great Grails Console Plugin installed, it’s easy to tweak the logging levels dynamically in your grails application. The quick and dirty way to switch your logging level dynamically, if you know the name of the … Continued
Creating New Instances of Spring “Singleton” Beans with Grails BeanBuilder
When I’m integration testing Grails service classes, I often want to mock off a part of the class so that a complicated code branch isn’t followed that I’m not trying to test. Grails will helpfully inject fully autowired Spring service … Continued
Using the Grails BeanBuilder to Set Arbitrary Properties From an External Config
I’m working with an existing library (Jedis a Redis client library) that has a fairly complicated connection pool config file with a large variety of potential properties that could be worth setting depending on the environment that my Grails app … Continued