From 5d374b7dbe903235da5f7f7f1b7349cfe314ee40 Mon Sep 17 00:00:00 2001 From: Mikael Mengistu Date: Wed, 11 Jan 2017 10:10:38 -0800 Subject: [PATCH] Remove delays in HubConnectionTests --- .../HubConnectionTests.cs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/test/Microsoft.AspNetCore.SignalR.Client.FunctionalTests/HubConnectionTests.cs b/test/Microsoft.AspNetCore.SignalR.Client.FunctionalTests/HubConnectionTests.cs index 0631e7dbd7..40beb84601 100644 --- a/test/Microsoft.AspNetCore.SignalR.Client.FunctionalTests/HubConnectionTests.cs +++ b/test/Microsoft.AspNetCore.SignalR.Client.FunctionalTests/HubConnectionTests.cs @@ -54,8 +54,6 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests var transport = new LongPollingTransport(httpClient, loggerFactory); using (var connection = await HubConnection.ConnectAsync(new Uri("http://test/hubs"), new JsonNetInvocationAdapter(), transport, httpClient, pipelineFactory, loggerFactory)) { - //TODO: Get rid of this. This is to prevent "No channel" failures due to sends occuring before the first poll. - await Task.Delay(500); EnsureConnectionEstablished(connection); var result = await connection.Invoke("HelloWorld"); @@ -77,8 +75,6 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests var transport = new LongPollingTransport(httpClient, loggerFactory); using (var connection = await HubConnection.ConnectAsync(new Uri("http://test/hubs"), new JsonNetInvocationAdapter(), transport, httpClient, pipelineFactory, loggerFactory)) { - //TODO: Get rid of this. This is to prevent "No channel" failures due to sends occuring before the first poll. - await Task.Delay(500); EnsureConnectionEstablished(connection); var result = await connection.Invoke("Echo", originalMessage); @@ -106,8 +102,6 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests tcs.TrySetResult((string)a[0]); }); - //TODO: Get rid of this. This is to prevent "No channel" failures due to sends occuring before the first poll. - await Task.Delay(500); EnsureConnectionEstablished(connection); await connection.Invoke("CallEcho", originalMessage); @@ -129,9 +123,6 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests var transport = new LongPollingTransport(httpClient, loggerFactory); using (var connection = await HubConnection.ConnectAsync(new Uri("http://test/hubs"), new JsonNetInvocationAdapter(), transport, httpClient, pipelineFactory, loggerFactory)) { - //TODO: Get rid of this. This is to prevent "No channel" failures due to sends occuring before the first poll. - await Task.Delay(500); - EnsureConnectionEstablished(connection); var ex = await Assert.ThrowsAnyAsync(