On our project we wanted to start having integration tests with JUnit and Spring's helper classes for integration testing.
We used the same context files that we use for the application and added some context files to add objects for test data from our model package.
The tests will run on Team city when commited and are disabled by making the Spring method isDisabledInThisEnvironment() from it's test helper classes return true.
When we run these tests as enabled on our local envirornment, thet run fine. However, when we run them on Team City, the context files alone cause an OutOfMemoryError. We did some diagnosis and realized that if we take away all of the test code that are using the Spring context files for testing, we still get an OutOfMemoryError on Team City.
If we got rid of all of the context files that we wanted to use for integration testing, then Team City would no longer get an OutOfMemoryError.
Is there a way Spring can be configured to do these integration tests without getting an OutOfMemoryError on Team City? Is there a way to configure Team city so we do not get an OutOfMemoryError using the Spring context files for our integration tests?