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

Run acceptance tests against the locally built sources #2340

Merged
merged 2 commits into from
Feb 24, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
revert backoff policy
  • Loading branch information
nohwnd committed Feb 24, 2020
commit 53809fdd4b3f796e76a4980ebda11c56a37c4c11
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ namespace Microsoft.VisualStudio.TestPlatform.CommunicationUtilities
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.Interfaces;
Expand Down Expand Up @@ -178,7 +177,7 @@ public async Task SetupClientAsync(IPEndPoint endpoint)
{
try
{
EqtTrace.Verbose("SocketCommunicationManager : SetupClientAsync : Attempting to connect to the server {0}:{1}.", endpoint.Address, endpoint.Port);
EqtTrace.Verbose("SocketCommunicationManager : SetupClientAsync : Attempting to connect to the server.");
await this.tcpClient.ConnectAsync(endpoint.Address, endpoint.Port);

if (this.tcpClient.Connected)
Expand All @@ -200,19 +199,7 @@ public async Task SetupClientAsync(IPEndPoint endpoint)
}
catch (Exception ex)
{
// a simple backoff policy, otherwise this loop produces and incredible
// amount of error logs when it cannot connect
var delay = watch.ElapsedMilliseconds < 100
? 1
: watch.ElapsedMilliseconds < 1000
? 10
: 100;

if ((watch.ElapsedMilliseconds + delay) < connectionTimeout)
{
await Task.Delay(delay);
EqtTrace.Error($"Connection Failed with error {0}, retrying in {delay} ms", ex.ToString());
}
EqtTrace.Error("Connection Failed with error {0}, retrying", ex.ToString());
}
}
while ((this.tcpClient != null) && !this.tcpClient.Connected && watch.ElapsedMilliseconds < connectionTimeout);
Expand Down