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
Recently we started to see TestPlatformException when tried to abort ongoing discovery. It is hard to reproduce and now only happens for .net core projects, potentially can happen for .net framework projects as well.
Steps to reproduce
Kick off discovery by running "Rebuild all"
Wait for the discovery to actually kick in
Run all tests in one project. You should see the discovery has been aborted and discovery/run for the current project is kicked off
After it finishes vstest.console will try to resume the previously aborted discovery. That's when you can try running all tests in one project just to abort discovery once more. Then you should see longer waiting times for the abortion, possibly VS being stuck
Expected behavior
Discovery stops and starts to run selected test project
Actual behavior
Got this exception: Aborting test discovery because a test run was requested. Microsoft.VisualStudio.TestPlatform.ObjectModel.TestPlatformException: Failed to negotiate protocol, waiting for response timed out after 90 seconds. This may occur due to machine slowness, please set environment variable VSTEST_CONNECTION_TIMEOUT to increase timeout. at Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.TestRequestSender.CheckVersionWithTestHost() at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.SetupChannel(IEnumerable1 sources, String runSettings) at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyDiscoveryManager.DiscoverTests(DiscoveryCriteria discoveryCriteria, ITestDiscoveryEventsHandler2 eventHandler)
Tagging @AbhitejJohn and @cvpoienaru who also ran into cases where the test console was essentially hung with the above steps. The hang was not easy to reproduce. Please post any additional details / diagnostics you may have around this.
Iirc when Abhitej looked under the debugger, it seemed like the test console was waiting indefinitely for the test host process to start and the test host process was not active (i.e. it had either already exited or it was not being started).
Description
Recently we started to see TestPlatformException when tried to abort ongoing discovery. It is hard to reproduce and now only happens for .net core projects, potentially can happen for .net framework projects as well.
Steps to reproduce
Expected behavior
Discovery stops and starts to run selected test project
Actual behavior
Got this exception:
Aborting test discovery because a test run was requested. Microsoft.VisualStudio.TestPlatform.ObjectModel.TestPlatformException: Failed to negotiate protocol, waiting for response timed out after 90 seconds. This may occur due to machine slowness, please set environment variable VSTEST_CONNECTION_TIMEOUT to increase timeout. at Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.TestRequestSender.CheckVersionWithTestHost() at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.SetupChannel(IEnumerable1 sources, String runSettings) at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyDiscoveryManager.DiscoverTests(DiscoveryCriteria discoveryCriteria, ITestDiscoveryEventsHandler2 eventHandler)
AB#1342836
The text was updated successfully, but these errors were encountered: