I'm writing to try and initiate a bit of a discussion regarding Spring Unit testing and in particular Transactional unit tests.
We currently have around 441 tests in a variety of classes annotated like so:
@RunWith(SpringJUnit4ClassRunner.class)
@TransactionConfiguration
@ContextConfiguration(locations={"/context/ServiceTest-context.xml"}, inheritLocations=false)
public class ServiceTests extends AbstractTransactionalJUnit4SpringContextTests {
@Test
public void testSomething() {}
@Test
public void testSomethingElse() {}
}
Each of our tests classes have their own test context.
We're facing an issue in which when we run individual test classes or individual packages the tests run fine.
However when we want to scale that up to run ALL our tests (currently > 400) by using maven or something similar such as Hudson integration.
mvn test
We get to a point and then start to experience Java GC Limit exceeded errors.
Now I get the feeling that this is down to our test plan design rather than the need for us to up any memory limits or turn off the warnings.
Can anyone share their experiences and the way they solved a similar problem?
Eggsy