5

When I run my nunit tests using the test runner in resharper, I get an OutOfMemory exception.

It appears to me that as a test suite runs, it consumes memory over the duration of the suite, and only releases memory back when the entire set of tests is complete. So even if I run a collection of tests from across multiple assemblies, their collective memory footprint gets consumed, and only released at the end.

Is there a way to cause the test runner to release memory more frequently? We're talking about 755 tests which doesn't seem excessive. I think the problem is related to using Rhino.mocks and all of the mock repository allocations that are created in this collection of tests.

Note: Using Resharper 5.1, Rhino.Mocks, VS2010, and NUnit 2.4.8

Thanks, John Schank

jschank
  • 554
  • 1
  • 5
  • 16

1 Answers1

1

Not sure if you are using the NUnit test runner or the Resharper test runner, but if you are using the NUnit test runner see the below link and upgrade to 2.5 or use Resharper test runner.

http://sourceforge.net/tracker/index.php?func=detail&aid=1965952&group_id=10749&atid=110749

ClassicThunder
  • 1,896
  • 16
  • 25
  • We happen to be using the resharper test runner. It almost seems like when the reshaper runner runs the whole suite, it doesn't really fully clean up across test project boundaries. Also, we are on the latest versions of both resharper and nunit – jschank Dec 22 '11 at 04:32