119 references to TimeoutAfter
IISExpress.FunctionalTests (1)
InProcess\AppOfflineIISExpressTests.cs (1)
48await runningTask.TimeoutAfter(TimeoutExtensions.DefaultTimeoutValue);
InMemory.FunctionalTests (4)
ChunkedRequestTests.cs (1)
891await readStartedTcs.Task.TimeoutAfter(TestConstants.DefaultTimeout);
ConnectionLimitTests.cs (2)
218await openedTcs.Task.TimeoutAfter(TimeSpan.FromSeconds(120)); 220await closedTcs.Task.TimeoutAfter(TimeSpan.FromSeconds(120));
UpgradeTests.cs (1)
347var exception = await Assert.ThrowsAsync<InvalidOperationException>(async () => await upgradeTcs.Task.TimeoutAfter(TimeSpan.FromSeconds(60)));
InteropTests (3)
InteropTests.cs (3)
84await serverProcess.WaitForReady().TimeoutAfter(DefaultTimeout); 103await clientProcess.WaitForReadyAsync().TimeoutAfter(DefaultTimeout); 105await clientProcess.WaitForExitAsync().TimeoutAfter(DefaultTimeout);
Microsoft.AspNetCore.Components.Server.Tests (3)
Circuits\CircuitRegistryTest.cs (2)
319await Task.Run(() => tcs.Task.TimeoutAfter(TimeSpan.FromSeconds(10))); 345await Task.Run(() => tcs.Task.TimeoutAfter(TimeSpan.FromSeconds(10)));
Circuits\RevalidatingServerAuthenticationStateProviderTest.cs (1)
209await incrementExecuted.Task.TimeoutAfter(TimeSpan.FromSeconds(5));
Microsoft.AspNetCore.Components.Tests (3)
RendererTest.cs (3)
3900await taskCompletionSource.Task.TimeoutAfter(TimeSpan.FromSeconds(10)); 3956await taskCompletionSource.Task.TimeoutAfter(TimeSpan.FromSeconds(10)); 4141await taskCompletionSource.Task.TimeoutAfter(TimeSpan.FromSeconds(10));
Microsoft.AspNetCore.Components.WebAssembly.Tests (3)
Hosting\WebAssemblyHostTest.cs (3)
32await task.TimeoutAfter(TimeSpan.FromSeconds(3)); 53await task.TimeoutAfter(TimeSpan.FromSeconds(3)); 79await task.TimeoutAfter(TimeSpan.FromSeconds(3));
Microsoft.AspNetCore.Components.WebViewE2E.Test (1)
WebViewManagerE2ETests.cs (1)
43await photinoProcess.WaitForExitAsync().TimeoutAfter(TimeSpan.FromSeconds(30));
Microsoft.AspNetCore.DataProtection.Tests (2)
HostingTests.cs (2)
42await tcs.Task.TimeoutAfter(TimeSpan.FromSeconds(10)); 69await tcs.Task.TimeoutAfter(TimeSpan.FromSeconds(10));
Microsoft.AspNetCore.Hosting.FunctionalTests (3)
ShutdownTests.cs (2)
93await startedTcs.Task.TimeoutAfter(TimeSpan.FromMinutes(1)); 106await completedTcs.Task.TimeoutAfter(TimeSpan.FromMinutes(1));
WebHostBuilderTests.cs (1)
55await tcs.Task.TimeoutAfter(TimeSpan.FromMinutes(1));
Microsoft.AspNetCore.InternalTesting (4)
src\Shared\TaskExtensions.cs (4)
36return task.TimeoutAfter(TimeSpan.FromMilliseconds(milliseconds), filePath, lineNumber); 41return task.TimeoutAfter(timeout, filePath, lineNumber); 46return task.AsTask().TimeoutAfter(TimeSpan.FromMilliseconds(milliseconds), filePath, lineNumber); 51return task.AsTask().TimeoutAfter(timeout, filePath, lineNumber);
Microsoft.AspNetCore.InternalTesting.Tests (3)
TaskExtensionsTest.cs (3)
17await Assert.ThrowsAsync<TimeoutException>(async () => await Task.Delay(30000, cts.Token).TimeoutAfter(TimeSpan.FromMilliseconds(50))); 30await Task.Delay(10).TimeoutAfter(TimeSpan.FromMilliseconds(30000)); 72var exception = await Assert.ThrowsAsync<TimeoutException>(() => ExpectedTimeout().TimeoutAfter(TimeSpan.FromMilliseconds(30000)));
Microsoft.AspNetCore.Mvc.TagHelpers.Test (12)
CacheTagHelperTest.cs (6)
571await event3.Task.TimeoutAfter(TimeSpan.FromSeconds(5)); 594await event1.Task.TimeoutAfter(TimeSpan.FromSeconds(5)); 601await event2.Task.TimeoutAfter(TimeSpan.FromSeconds(5)); 654await event3.Task.TimeoutAfter(TimeSpan.FromSeconds(5)); 677await event1.Task.TimeoutAfter(TimeSpan.FromSeconds(5)); 684await event2.Task.TimeoutAfter(TimeSpan.FromSeconds(5));
DistributedCacheTagHelperTest.cs (6)
570await event3.Task.TimeoutAfter(TimeSpan.FromSeconds(5)); 597await event1.Task.TimeoutAfter(TimeSpan.FromSeconds(5)); 604await event2.Task.TimeoutAfter(TimeSpan.FromSeconds(5)); 662await event3.Task.TimeoutAfter(TimeSpan.FromSeconds(5)); 689await event1.Task.TimeoutAfter(TimeSpan.FromSeconds(5)); 696await event2.Task.TimeoutAfter(TimeSpan.FromSeconds(5));
Microsoft.AspNetCore.ResponseCompression.Tests (8)
ResponseCompressionMiddlewareTest.cs (8)
641await responseReceived.Task.TimeoutAfter(TimeSpan.FromSeconds(3)); 687await responseReceived.Task.TimeoutAfter(TimeSpan.FromSeconds(3)); 739await responseReceived.Task.TimeoutAfter(TimeSpan.FromSeconds(3)); 792await responseReceived.Task.TimeoutAfter(TimeSpan.FromSeconds(3)); 862await signal.Task.TimeoutAfter(TimeSpan.FromSeconds(3)); 926await signal.Task.TimeoutAfter(TimeSpan.FromSeconds(3)); 990await signal.Task.TimeoutAfter(TimeSpan.FromSeconds(3)); 1201await responseReceived.Task.TimeoutAfter(TimeSpan.FromSeconds(3));
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (36)
AuthenticationTests.cs (1)
189await completed.Task.TimeoutAfter(TimeSpan.FromSeconds(5));
Listener\ServerTests.cs (2)
42await canceled.Task.TimeoutAfter(interval); 104await canceled.Task.TimeoutAfter(interval);
ResponseTests.cs (6)
152await onStartingCalled.Task.TimeoutAfter(TimeSpan.FromSeconds(1)); 154await onCompletedCalled.Task.TimeoutAfter(TimeSpan.FromSeconds(5)); 181await onStartingCalled.Task.TimeoutAfter(TimeSpan.FromSeconds(1)); 183await onCompletedCalled.Task.TimeoutAfter(TimeSpan.FromSeconds(5)); 211await onStartingCalled.Task.TimeoutAfter(TimeSpan.FromSeconds(1)); 213await onCompletedCalled.Task.TimeoutAfter(TimeSpan.FromSeconds(5));
ServerTests.cs (27)
157await received.Task.TimeoutAfter(TimeSpan.FromSeconds(10)); 173await stopped.Task.TimeoutAfter(TimeSpan.FromSeconds(10)); 179await received.Task.TimeoutAfter(TimeSpan.FromSeconds(10)); 194await shutdown.Task.TimeoutAfter(TimeSpan.FromSeconds(15)); 200await received.Task.TimeoutAfter(TimeSpan.FromSeconds(10)); 289await aborted.Task.TimeoutAfter(interval); 290await canceled.Task.TimeoutAfter(interval); 298await received.Task.TimeoutAfter(interval); 304await canceled.Task.TimeoutAfter(interval); 323await canceled.Task.TimeoutAfter(interval); 329await received.Task.TimeoutAfter(interval); 423await run.Task.TimeoutAfter(TimeSpan.FromSeconds(10)); 429await received.Task.TimeoutAfter(TimeSpan.FromSeconds(10)); 442await Task.WhenAll(stopTask1, stopTask2, stopTask3).TimeoutAfter(TimeSpan.FromSeconds(10)); 457await run.Task.TimeoutAfter(TimeSpan.FromSeconds(10)); 463await received.Task.TimeoutAfter(TimeSpan.FromSeconds(10)); 476await Task.WhenAll(stopTask1, stopTask2, stopTask3).TimeoutAfter(TimeSpan.FromSeconds(10)); 494await run.Task.TimeoutAfter(TimeSpan.FromSeconds(10)); 500await received.Task.TimeoutAfter(TimeSpan.FromSeconds(10)); 513await Task.WhenAll(stopTask1, stopTask2, stopTask3).TimeoutAfter(TimeSpan.FromSeconds(10)); 531await run.Task.TimeoutAfter(TimeSpan.FromSeconds(10)); 537await received.Task.TimeoutAfter(TimeSpan.FromSeconds(10)); 550await Task.WhenAll(stopTask1, stopTask2, stopTask3).TimeoutAfter(TimeSpan.FromSeconds(10)); 570await run.Task.TimeoutAfter(TimeSpan.FromSeconds(15)); 576await received.Task.TimeoutAfter(TimeSpan.FromSeconds(10)); 585await Task.WhenAll(stopTask1, stopTask2).TimeoutAfter(TimeSpan.FromSeconds(10)); 594await server.StopAsync(default(CancellationToken)).TimeoutAfter(TimeSpan.FromSeconds(10));
Microsoft.AspNetCore.Server.IISIntegration.Tests (4)
IISMiddlewareTests.cs (4)
139await applicationStoppingFired.Task.TimeoutAfter(TimeSpan.FromSeconds(10)); 199await requestExecuted.Task.TimeoutAfter(TimeSpan.FromSeconds(2)); 244await requestExecuted.Task.TimeoutAfter(TimeSpan.FromSeconds(2)); 289await requestExecuted.Task.TimeoutAfter(TimeSpan.FromSeconds(2));
Microsoft.AspNetCore.Server.IntegrationTesting (1)
Deployers\SelfHostDeployer.cs (1)
198await started.Task.TimeoutAfter(TimeSpan.FromMinutes(15));
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (3)
KestrelServerTests.cs (3)
646Assert.Same(unbindException, await Assert.ThrowsAsync<InvalidOperationException>(() => stopTask1.TimeoutAfter(timeout))); 647Assert.Same(unbindException, await Assert.ThrowsAsync<InvalidOperationException>(() => stopTask2.TimeoutAfter(timeout))); 648Assert.Same(unbindException, await Assert.ThrowsAsync<InvalidOperationException>(() => stopTask3.TimeoutAfter(timeout)));
Microsoft.AspNetCore.Server.Kestrel.Tests (1)
KestrelConfigurationLoaderTests.cs (1)
900await fileTcs.Task.TimeoutAfter(TimeSpan.FromSeconds(10)); // Needs to be meaningfully longer than the polling period - 4 seconds
Microsoft.AspNetCore.StaticFiles.FunctionalTests (3)
StaticFileMiddlewareTests.cs (3)
255await requestCancelled.Task.TimeoutAfter(interval); 283await requestReceived.Task.TimeoutAfter(interval); 289await responseComplete.Task.TimeoutAfter(interval);
Microsoft.AspNetCore.Tests (2)
WebApplicationTests.cs (1)
1376await changed.Task.TimeoutAfter(TimeSpan.FromSeconds(10));
WebHostTests.cs (1)
52await changed.Task.TimeoutAfter(TimeSpan.FromSeconds(10));
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (17)
HealthCheckPublisherHostedServiceTest.cs (17)
120await publishers[0].Started.TimeoutAfter(TimeSpan.FromSeconds(10)); 121await publishers[1].Started.TimeoutAfter(TimeSpan.FromSeconds(10)); 122await publishers[2].Started.TimeoutAfter(TimeSpan.FromSeconds(10)); 158await publisher.Started.TimeoutAfter(TimeSpan.FromSeconds(10)); 171await running.TimeoutAfter(TimeSpan.FromSeconds(10)); 200await publisher.Started.TimeoutAfter(TimeSpan.FromSeconds(10)); 204await running.TimeoutAfter(TimeSpan.FromSeconds(10)); 360await publisher.Started.TimeoutAfter(TimeSpan.FromSeconds(10)); 367await running.TimeoutAfter(TimeSpan.FromSeconds(10)); 418await publishers[0].Started.TimeoutAfter(TimeSpan.FromSeconds(10)); 419await publishers[1].Started.TimeoutAfter(TimeSpan.FromSeconds(10)); 420await publishers[2].Started.TimeoutAfter(TimeSpan.FromSeconds(10)); 426await running.TimeoutAfter(TimeSpan.FromSeconds(10)); 464await publisher.Started.TimeoutAfter(TimeSpan.FromSeconds(10)); 472await running.TimeoutAfter(TimeSpan.FromSeconds(10)); 681await RunServiceAsync(service).TimeoutAfter(TimeSpan.FromSeconds(10)); 725await RunServiceAsync(service).TimeoutAfter(TimeSpan.FromSeconds(10));
Sockets.FunctionalTests (2)
src\Servers\Kestrel\test\FunctionalTests\MaxRequestBufferSizeTests.cs (2)
346await startReadingRequestBody.Task.TimeoutAfter(TimeSpan.FromSeconds(120)); 355await clientFinishedSendingRequestBody.Task.TimeoutAfter(TimeSpan.FromSeconds(120));