From 793559af9866739454524c927f90be4c1fbda791 Mon Sep 17 00:00:00 2001 From: Balint Farkas Date: Thu, 13 Jun 2019 11:30:33 +0200 Subject: [PATCH] Corrected spelling of "canceled". Put .OrTimeout() on every await call. --- .../HttpConnectionTests.ConnectionLifecycle.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/SignalR/clients/csharp/Client/test/UnitTests/HttpConnectionTests.ConnectionLifecycle.cs b/src/SignalR/clients/csharp/Client/test/UnitTests/HttpConnectionTests.ConnectionLifecycle.cs index fef7cd3160..e551d774ac 100644 --- a/src/SignalR/clients/csharp/Client/test/UnitTests/HttpConnectionTests.ConnectionLifecycle.cs +++ b/src/SignalR/clients/csharp/Client/test/UnitTests/HttpConnectionTests.ConnectionLifecycle.cs @@ -393,7 +393,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.Tests testHttpHandler.OnNegotiate(async (request, cancellationToken) => { // Wait here for the test code to cancel the "outer" token - await negotiateSyncPoint.WaitToContinue(); + await negotiateSyncPoint.WaitToContinue().OrTimeout(); // Cancel cancellationToken.ThrowIfCancellationRequested(); @@ -411,9 +411,9 @@ namespace Microsoft.AspNetCore.SignalR.Client.Tests // Wait for the connection to get to the "WaitToContinue" call above, // which means it has gotten to Negotiate - await negotiateSyncPoint.WaitForSyncPoint(); + await negotiateSyncPoint.WaitForSyncPoint().OrTimeout(); - // Assert that StartAsync has not yet been cancelled + // Assert that StartAsync has not yet been canceled Assert.False(startTask.IsCanceled); // Cancel StartAsync, then "release" the SyncPoint @@ -421,8 +421,8 @@ namespace Microsoft.AspNetCore.SignalR.Client.Tests cts.Cancel(); negotiateSyncPoint.Continue(); - // Assert that StartAsync was cancelled - await Assert.ThrowsAsync(() => startTask); + // Assert that StartAsync was canceled + await Assert.ThrowsAsync(() => startTask).OrTimeout(); }); } }