From 7d035f48bcab909354b2fa467dde825ecb9d86fd Mon Sep 17 00:00:00 2001 From: David Fowler Date: Thu, 22 Feb 2018 00:44:06 -0800 Subject: [PATCH] Revert "Add timeout back to hanging test (#1480)" (#1482) This reverts commit 09adc4a8474c8f3e3af9921285b66e1d8a7627dd. --- .../Microsoft.AspNetCore.SignalR.Tests.Utils/TaskExtensions.cs | 2 +- test/Microsoft.AspNetCore.SignalR.Tests/EndToEndTests.cs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/test/Microsoft.AspNetCore.SignalR.Tests.Utils/TaskExtensions.cs b/test/Microsoft.AspNetCore.SignalR.Tests.Utils/TaskExtensions.cs index 8a0f5ae4c1..9fd7057005 100644 --- a/test/Microsoft.AspNetCore.SignalR.Tests.Utils/TaskExtensions.cs +++ b/test/Microsoft.AspNetCore.SignalR.Tests.Utils/TaskExtensions.cs @@ -8,7 +8,7 @@ namespace System.Threading.Tasks { public static class TaskExtensions { - private const int DefaultTimeout = 1000 * 60; + private const int DefaultTimeout = 5000; public static Task OrTimeout(this Task task, int milliseconds = DefaultTimeout, [CallerMemberName] string memberName = null, [CallerFilePath] string filePath = null, [CallerLineNumber] int? lineNumber = null) { diff --git a/test/Microsoft.AspNetCore.SignalR.Tests/EndToEndTests.cs b/test/Microsoft.AspNetCore.SignalR.Tests/EndToEndTests.cs index 3fa1dd8307..089e11b8fe 100644 --- a/test/Microsoft.AspNetCore.SignalR.Tests/EndToEndTests.cs +++ b/test/Microsoft.AspNetCore.SignalR.Tests/EndToEndTests.cs @@ -290,7 +290,8 @@ namespace Microsoft.AspNetCore.SignalR.Tests logger.LogInformation("Sent message", bytes.Length); logger.LogInformation("Receiving message"); - var receivedData = await receiveTcs.Task.OrTimeout(); + // No timeout here because it can take a while to receive all the bytes + var receivedData = await receiveTcs.Task; Assert.Equal(message, Encoding.UTF8.GetString(receivedData)); logger.LogInformation("Completed receive"); }