Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestPlatformException when aborting ongoing discovery #2904

Closed
Sanan07 opened this issue May 13, 2021 · 2 comments
Closed

TestPlatformException when aborting ongoing discovery #2904

Sanan07 opened this issue May 13, 2021 · 2 comments
Assignees
Labels

Comments

@Sanan07
Copy link
Contributor

Sanan07 commented May 13, 2021

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

  1. Kick off discovery by running "Rebuild all"
  2. Wait for the discovery to actually kick in
  3. Run all tests in one project. You should see the discovery has been aborted and discovery/run for the current project is kicked off
  4. 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)

AB#1342836

@Sanan07 Sanan07 added the bug label May 13, 2021
@Sanan07 Sanan07 added this to the 17.0 milestone May 13, 2021
@Sanan07 Sanan07 self-assigned this May 13, 2021
@shyamnamboodiripad
Copy link
Contributor

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).

@Sanan07 Sanan07 added the sprint label Jun 15, 2021
@Sanan07 Sanan07 assigned drognanar and unassigned Sanan07 Dec 21, 2021
@Evangelink Evangelink added needs-triage This item should be discussed in the next triage meeting. and removed sprint needs-triage This item should be discussed in the next triage meeting. labels Aug 1, 2022
@Evangelink
Copy link
Member

Closed by #3349

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants