This Question is Answered

1 "correct" answer available (4 pts) 2 "helpful" answers available (2 pts)
6 Replies Last post: Mar 16, 2010 11:46 PM by Andrew gonzalez  
Andrew gonzalez Newbie 6 posts since
Mar 15, 2010
Currently Being Moderated

Mar 15, 2010 7:10 PM

Spring integration tests with Team city: OutOfMemoryError

Hello all,

 

On our project we wanted to start having integration tests with JUnit and Spring's helper classes for integration testing.

 

http://static.springsource.org/spring/docs/2.5.x/api/org/springframework/test/annotation/AbstractAnnotationAwareTransactionalTests.html

 

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.

 

http://static.springsource.org/spring/docs/2.5.x/api/org/springframework/test/ConditionalTestCase.html#isDisabledInThisEnvironment%28java.lang.String%29

 

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?

Marina Grechko JetBrains 600 posts since
Oct 12, 2009
Currently Being Moderated
Mar 16, 2010 3:41 PM in response to: Andrew gonzalez
Re: Spring integration tests with Team city: OutOfMemoryError

Andrew,

 

What build runner do you use? In Ant runner case could you please try to run tests from the command line using all parameters that TeamCity use (you could find the runner with parameters in teamcity-agent.log) and the same user account.

Pavel Sher JetBrains 2,148 posts since
Mar 6, 2008
Currently Being Moderated
Mar 16, 2010 7:06 PM in response to: Andrew gonzalez
Re: Spring integration tests with Team city: OutOfMemoryError

What kind of memory error did you get? Is it heap space error or prm gen space? Also it would be helpful to see build log.

More Like This

  • Retrieving data ...