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

vstest.console waits for the host process to connect even if it failed to start in .Net Core scenarios #1689

Closed
AbhitejJohn opened this issue Jul 14, 2018 · 1 comment
Labels

Comments

@AbhitejJohn
Copy link
Contributor

Description

For a net core solution with tests, if a user performs a Build that triggers CBD discovery and performs a cancellation/rebuild when discovery is in progress, the discovery operation goes on for a considerably longer time and later reports that it could not find tests with the below stacktrace:

[7/13/2018 4:53:36 PM Informational] NUnit Adapter 3.8.0.0: Test discovery complete
[7/13/2018 4:55:04 PM Error] Microsoft.VisualStudio.TestPlatform.ObjectModel.TestPlatformException: Testhost process exited with error: The specified deps.json [D:\git\UnitTestVault\Generated\NUnit_10k.NetCore\bin\Debug\netcoreapp2.0\NUnit.NetCore.10k.Long.deps.json] does not exist

   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.ThrowExceptionOnConnectionFailure(Int32 connTimeout)
   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.SetupChannel(IEnumerable`1 sources)
   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyDiscoveryManager.DiscoverTests(DiscoveryCriteria discoveryCriteria, ITestDiscoveryEventsHandler2 eventHandler)
[7/13/2018 4:55:05 PM Error] Microsoft.VisualStudio.TestPlatform.ObjectModel.TestPlatformException: Testhost process exited with error: The specified deps.json [D:\git\UnitTestVault\Generated\NUnit_10k.NetCore\bin\Debug\netcoreapp2.0\NUnit.NetCore.10k.Format1.deps.json] does not exist

   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.ThrowExceptionOnConnectionFailure(Int32 connTimeout)
   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.SetupChannel(IEnumerable`1 sources)
   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyDiscoveryManager.DiscoverTests(DiscoveryCriteria discoveryCriteria, ITestDiscoveryEventsHandler2 eventHandler)
[7/13/2018 4:55:05 PM Error] Microsoft.VisualStudio.TestPlatform.ObjectModel.TestPlatformException: Testhost process exited with error: The specified deps.json [D:\git\UnitTestVault\Generated\NUnit_10k.NetCore\bin\Debug\netcoreapp2.0\NUnit.NetCore.10k.Format2.deps.json] does not exist

   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.ThrowExceptionOnConnectionFailure(Int32 connTimeout)
   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.SetupChannel(IEnumerable`1 sources)
   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyDiscoveryManager.DiscoverTests(DiscoveryCriteria discoveryCriteria, ITestDiscoveryEventsHandler2 eventHandler)
[7/13/2018 4:55:05 PM Informational] ========== Discover test finished: 0 found (0:01:33.7019648) ==========

This is more of a timing issue and is scoped mostly to process startup. It looks like it tries to start of another host process with the deps.json but since the clean operation would have cleared the deps.json by then the process fails to start. The connection logic however isn't aware of this failure and waits for connectiontimeout to be able to say it cannot connect to the process with the right message. If we could consider process launch failures while waiting we could potentially bail out sooner in these cases.
NUnit.NetCore.10k.Double.zip

Do let me know if you need more information on this.

@AbhitejJohn
Copy link
Contributor Author

/cc: @cltshivash to help triage.

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

3 participants