You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Test execution time and memory usage both surge after upgrading MSTest.TestAdapter from 3.2 to 3.6.3
Steps To Reproduce
I can't share our code base, but I did do some poking around with windbg:
It looks like all the test class instances are held onto permanently.
Each of our test classes has member variables that hold several MB of data (This may be dubious practice, but it's how our tests been built)
If these instances are not garbage collected then memory keeps growing.
ExecutionContextService.InstancesExecutionContexts in Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices seems to be the culprit. For whatever reason, none of the test instances are being cleaned up - I still have 1000s of test instances rooted.
Expected behavior
Performance should not degrade
Actual behavior
A set of tests that previously took 5 minutes now takes 1 hour.
Additional context
Command used to run tests has a rather large test case filter, in case that is relevant
I imagine the reasons we had for setting this originally are lost in the mists of time.
In a sample to repro the issue, I've found this makes a huge difference.
Test execution time and memory usage both surge after upgrading MSTest.TestAdapter from 3.2 to 3.6.3
Steps To Reproduce
I can't share our code base, but I did do some poking around with windbg:
It looks like all the test class instances are held onto permanently.
Each of our test classes has member variables that hold several MB of data (This may be dubious practice, but it's how our tests been built)
If these instances are not garbage collected then memory keeps growing.
ExecutionContextService.InstancesExecutionContexts
in Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices seems to be the culprit. For whatever reason, none of the test instances are being cleaned up - I still have 1000s of test instances rooted.Expected behavior
Performance should not degrade
Actual behavior
A set of tests that previously took 5 minutes now takes 1 hour.
Additional context
Command used to run tests has a rather large test case filter, in case that is relevant
The text was updated successfully, but these errors were encountered: