Comment 0 for bug 1069666

Revision history for this message
SoloSK (sebastian-krusch) wrote :

Hi,

when we're running large tests with many assemblies we get an OutOfMemoryException. Maybe there is an issue with the dispose of the runners. We currently avoid this problem with a temporarily fix. As you can see below, we dispose every runner after its AddResult is complete.

src/ClientUtilities/util/AggregatingTestRunner.cs
...
else
{
    foreach (TestRunner runner in runners)
        if (filter.Pass(runner.Test))
        {
            try { result.AddResult(runner.Run(this, filter, tracing, logLevel)); }
            finally { runner.Dispose(); }
        }
}
...
public void Dispose()
{
    foreach (TestRunner runner in runners)
        if (runner != null)
        {
            //runner.Dispose();
        }
}

We're not sure if this could cause any side effects, but for now it helps us through. We can reconstruct this problem with a simple dummy test where memory is allocated by a big static array. Also get the OutOfMemoryException with a heap of 1.457.708K, with the fix the test is running through with a heap of 450.944K.

We're running NUnit with the pre 2.6.2 version, but the problem also occurs in release 2.6.1.
[Runtime Environment]
[OS Version: Microsoft Windows NT 5.1.2600 Service Pack 3]
[CLR Version: 4.0.30319.269 ( Net 4.0 )]

Tried also some different parameters, but running with default settings for now.

Thanks in advance.