Join GitHub today
Fix the Out-Of-Memory issues when running all tests from solution #3405
As mentioned in chat yesterday, make sure your test settings are set to run the tests with a 64 bit procesor architecture. Currently, running all tests consumes a bit more than 3 GB of memory; with a 32 bit process, you only get about 1,3 GB.
The issue seems to be that the VS test runner does not release test objects until all tests have finished.
Some heap analysis I performed on a testrun suggests that the cause of huge memory consumption when running the tests is Listeners attached to
A potential fix is to drop the events into the VBComponents instance instead of keeping them static. That should allow the testrunner to more aggressively GC unused ParserState instances and keep memory usage down: