All unit tests finished, but process still running
Hi,
I'm having the following problem, I'm getting the above message and frequently it takes ReSharper over 10 seconds to unload after all my unit tests have already finished.
My reproduction scenario consists of running a single NUnit test under debug. Normally the test finishes (I see the UI stops spinning and the process closes). However, if I put a breakpoint in the code and then let it continue, the test finishes (UI stops spinning, test fixture one time tear-down is done), but the process takes over 10 seconds to stop and the above message pops up.
I paused the process during this hanging phase and below you can see the remaining threads.
https://goo.gl/V3N5TR
My setup:
MSVS 15.6.5
ReSharper 2018.1 build 2018-04-14
Please sign in to leave a comment.
Still happens with:
Visual Studio: 15.7.3
ReSharper: 2018.1.2 build 2018-05-30
I've also been getting this when attempting to debug a single test. It's very annoying.
So far i have noticed it when attempting to debug a single data driven test that uses NUnits TestCaseSource attribute. I suspect its when it attempts to generate the new test iterations based on the TestCaseSource array.
In addition to this i'm getting the message "All unit tests finished, but process still running" if you say yes to stop you never hit your break point. When you hit no to continue debugging exceptions are being caught in completely unrelated code. If you check the call stack it's from a test that is not meant to be currently running.
This happens multiple times until it gets around to your test.
However its not consistently happening every time.
JetBrains ReSharper Ultimate 2018.1.2 Build 112.0.20180530.113618
ReSharper 2018.1.20180530.115351
Actually i think i pin pointed when it happens.
1. Create a data driven test with the TestCaseSource that has mutiple scenarios.
2. Run the test at least once, this breaks the test down into 1 test result per scenario specified in the TestCaseSource.
3. Right click a single scenario and select debug.
This will cause other tests to run in the background and exceptions will be caught. If you debug all scenarios you don't get the problem
In my case it happens even when debugging not data driven tests.
Hello!
Sorry for delay in responding.
Is there any chance you could provide some sample solution demonstrating the problem?
Thanks in advance.
Not sure I can reproduce it on another solution... I'll try...
I just updated to ReSharper 2018.2 and I am getting this issue. Also tried Rider 2018.2 and the same. Didn't happen before with the same solution.
Hello Daniel!
Thank you for the feedback.
Could you please run Visual Studio with the following command line: 'devenv /ReSharper.LogFile C:\resharper_log.txt /ReSharper.LogLevel Verbose', reproduce the issue and send us a corresponding 'resharper_log.txt' file.You can do it privately via 'Submit a request' form, please add link to this thread discussion in request details.
Thank you.
I am also getting this message tonight for the first time immediately after I updated ReSharper to version 2020.2. This happens in both xUnit and NUnit tests which have been running with ReSharper for several months without issues. It happens after all tests are completed, whether they have passed or not.
I updated to Rider version 2020.2 yesterday, and am now getting this issue in my existing XUnit tests.
Same :-(
Hello everyone! Please take a look at the following comments to help you understand why this message appears:
https://youtrack.jetbrains.com/issue/RIDER-49332#focus=Comments-27-4354352.0-0
And a good comment from our user:
https://youtrack.jetbrains.com/issue/RIDER-49584#focus=Comments-27-4356736.0-0
But we will think about how to improve this experience anyway. You can comment/vote on any of these tickets to stay informed about status changes. Thank you!
Same, started last week,happens once every hour or so on different projects. Doesn't seem to be code related. hard to reproduce :S
Eskensberg what ReSharper version are you using? (ReSharper | Help | About JetBrains ReSharper) If you kill the process after the problem occurs and run the same tests again, will the dialog show up again?
Hi Maria,
2019.3.4
When I kill the process, it does not show up again. It shows up every few times when I run tests. My colleage reported the issue on completely separate project as well.
It's a minor nuisanse, test run just fine on cloud, but just worried that there is an actual async issue or memory leak, but the window does not provide enough information to track the source of the issue :S
Thanks!
Hi Eskensberg,
If you increase the value for "Wait x seconds for test runner to exit" in "ReSharper | Options | Tools | Unit Testing | Test Runner", will the dialog appear?
>My colleage reported the issue on completely separate project as well.
Do you know where your colleague reported the issue?
I had the same problem: "Process is still running after the test execution has finished."
It turned out, test runner does not stop if you don't dispose a disposable object (maybe not all disposable objects but WebApplicationFactory<TEntryPoint> class had this problem). When I put a using statement on it, the problem is gone.
So, you may investigate the error with this information.
Hope this helps.
Hey Mesut Bulut - this was EXACTLY my problem as well, same class as well.
Thanks!!
Try run tests using VS standard test explorer. In my case, it gave me the exact stack trace to the real issue in the code. It was an exception during disposal of the very unrelated object. But still, it was the cause.
Running ReSharper 2021.1.5 in VS 16.9.3 and saw this error as we when running a test that used the Selenium driver to open a Firefox window for UI testing. This was my first run and window took longer that expected to open. Had to kill VS to as the error did not lead to a good process Id. When I restarted VS I ran the same test in debug mode and it worked correctly. I then tried it as "run" test and again it worked correctly. Not sure if there needs to be some timing built into my test framework or the error is with ReSharper.