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

Invalid event raised during socket failure #1727

Closed
mayankbansal018 opened this issue Aug 13, 2018 · 0 comments
Closed

Invalid event raised during socket failure #1727

mayankbansal018 opened this issue Aug 13, 2018 · 0 comments
Assignees

Comments

@mayankbansal018
Copy link
Contributor

mayankbansal018 commented Aug 13, 2018

Description

In case when connection b/w testhost, & vstest.console fails, we are incorrectly raised Connected Event in SocketClient.cs , which ends up creating confusion., & the finally the test fails by throwing an incorrect stack

`StackTrace:
at Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.TestRequestSender.CheckVersionWithTestHost()

Microsoft.TestPlatform.CommunicationUtilities.dll!Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.TestRequestSender.CheckVersionWithTestHost() Unknown
Microsoft.TestPlatform.CrossPlatEngine.dll!Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.SetupChannel(System.Collections.Generic.IEnumerable sources) Unknown
Microsoft.TestPlatform.CrossPlatEngine.dll!Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyDiscoveryManager.DiscoverTests(Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.DiscoveryCriteria discoveryCriteria, Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.ITestDiscoveryEventsHandler2 eventHandler) Unknown
Microsoft.TestPlatform.CrossPlatEngine.dll!Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.Parallel.ParallelProxyDiscoveryManager.DiscoverTestsOnConcurrentManager.AnonymousMethod__0() Unknown
`

Steps to reproduce

Not easy, happens with UWP tests apps, when deployed on remote machines(XBox, SurfaceHub, etc..)

Expected behavior

The platform should throw appropriate error, telling the communication could not established,& the stack for same.
Microsoft.TestPlatform.CommunicationUtilities.dll!Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.TestRequestSender.InitializeCommunication.AnonymousMethod__18_0(object sender, Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.Interfaces.ConnectedEventArgs args) Line 122 C# [Native to Managed Transition] [Managed to Native Transition] mscorlib.dll!System.Delegate.DynamicInvokeImpl(object[] args) Unknown mscorlib.dll!System.Delegate.DynamicInvoke(object[] args) Unknown Microsoft.TestPlatform.CoreUtilities.dll!Microsoft.VisualStudio.TestPlatform.Utilities.MulticastDelegateUtilities.SafeInvoke(System.Delegate delegates, object sender, System.EventArgs args, string traceDisplayName) Line 44 C# Microsoft.TestPlatform.CommunicationUtilities.dll!Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.SocketClient.OnServerConnected(System.Threading.Tasks.Task connectAsyncTask) Line 83 C#

Inner Exception:
Exception Code: -2146233088
at System.Net.Sockets.Socket.InternalEndConnect(IAsyncResult asyncResult) at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult) at System.Net.Sockets.TcpClient.EndConnect(IAsyncResult asyncResult) at System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task1 promise, Boolean requiresSynchronization)

Actual behavior

Incorrect stack trace misleads diagnosis.

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

No branches or pull requests

1 participant