Closed Anakael closed 6 months ago
I'm having the same problem. Not only the CPU but also the RAM is consumed completely.
I'm using xUnit, and for me, it happens when I execute the nearest test, without opening the test summary.
@Anakael / @B3RR10 - Could you add some more detail? Specifically:
Any neotest.log
output that shows how frequently the dotnet test
command is running.
DotNetUtils.get_test_full_names output
I suspect that the dotnet test command is being triggered too often for some reason. Last time I load tested the plugin was a while ago, with an older version of neotest
core, and admittedly with around 350 xunit tests.
I need to get some more info and build in some sort of caching of the command, it sounds like. Until then you can pin neotest-dotnet
to commit 4ebc336c19646791b75c2ae1a30f2b8e403b9d63
to revert back to when the plugin used a different mechanism.
So I've pushed some changes that will significantly reduce the number of dotnet processes that will spawn on test discovery. See how this helps @Anakael / @B3RR10 for your use cases. The performance should be something like O(1) instead of O(n) now, where n
was the number of test folders, for every time the discover tests event is run in neotest core.
Nice! I'll test it tomorrow. Thanks a lot!
Now summary works fine. But before tests are discovered running test from code doesn't work:
I have around 800 tests in my working project. After I call :TestSummary in one test class, my CPU fully consumed by many .NET HOSTs and all system is freezing.