Resharper - NUnit - VS2010:内存不足异常
当我使用 resharper 中的测试运行程序运行 nunit 测试时,出现 OutOfMemory 异常。
在我看来,当测试套件运行时,它会在套件的持续时间内消耗内存,并且仅在整组测试完成时才释放内存。因此,即使我跨多个程序集运行一组测试,它们的集体内存占用也会被消耗,并且只会在最后释放。
有没有办法让测试运行器更频繁地释放内存?我们谈论的是 755 次测试,这似乎并不过分。我认为问题与使用 Rhino.mocks 以及在此测试集合中创建的所有模拟存储库分配有关。
注意:使用 Resharper 5.1、Rhino.Mocks、VS2010 和 NUnit 2.4.8
谢谢, 约翰·尚克
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不确定您是否使用 NUnit 测试运行程序或 Resharper 测试运行程序,但如果您使用 NUnit 测试运行程序,请参阅以下链接并升级到 2.5 或使用 Resharper 测试运行程序。
http://sourceforge.net/tracker /index.php?func=detail&aid=1965952&group_id=10749&atid=110749
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