167 references to DefaultTimeout
InMemory.FunctionalTests (36)
Http2\Http2ConnectionTests.cs (1)
5660var result = await context.Request.BodyReader.ReadAsync().DefaultTimeout();
Http3\Http3ConnectionTests.cs (2)
188Assert.Null(await Http3Api.MultiplexedConnectionContext.AcceptAsync().DefaultTimeout()); 385var maxFieldSetting = await Http3Api.ServerReceivedSettingsReader.ReadAsync().DefaultTimeout();
Http3\Http3StreamTests.cs (5)
2758var outboundControlStream = await Http3Api.CreateControlStream().DefaultTimeout(); 2765var invalidStream = await Http3Api.CreateControlStream(typeId).DefaultTimeout(); 2778}, endStream: true).DefaultTimeout(); 2799var maxFieldSetting = await Http3Api.ServerReceivedSettingsReader.ReadAsync().DefaultTimeout(); 2810}, endStream: true).DefaultTimeout();
Http3\Http3TimeoutTests.cs (22)
25var controlStream = await Http3Api.GetInboundControlStream().DefaultTimeout(); 26await controlStream.ExpectSettingsAsync().DefaultTimeout(); 42var controlStream = await Http3Api.GetInboundControlStream().DefaultTimeout(); 43await controlStream.ExpectSettingsAsync().DefaultTimeout(); 66var controlStream = await Http3Api.GetInboundControlStream().DefaultTimeout(); 67await controlStream.ExpectSettingsAsync().DefaultTimeout(); 101var controlStream = await Http3Api.GetInboundControlStream().DefaultTimeout(); 102await controlStream.ExpectSettingsAsync().DefaultTimeout(); 133var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(_noopApplication, null).DefaultTimeout(); 135var controlStream = await Http3Api.GetInboundControlStream().DefaultTimeout(); 136await controlStream.ExpectSettingsAsync().DefaultTimeout(); 174var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(_noopApplication, null).DefaultTimeout(); 176var controlStream = await Http3Api.GetInboundControlStream().DefaultTimeout(); 177await controlStream.ExpectSettingsAsync().DefaultTimeout(); 223var controlStream = await Http3Api.GetInboundControlStream().DefaultTimeout(); 224await controlStream.ExpectSettingsAsync().DefaultTimeout(); 258var controlStream = await Http3Api.GetInboundControlStream().DefaultTimeout(); 259await controlStream.ExpectSettingsAsync().DefaultTimeout(); 287var controlStream = await Http3Api.GetInboundControlStream().DefaultTimeout(); 288await controlStream.ExpectSettingsAsync().DefaultTimeout(); 313var controlStream = await Http3Api.GetInboundControlStream().DefaultTimeout(); 314await controlStream.ExpectSettingsAsync().DefaultTimeout();
Http3\WebTransport\WebTransportHandshakeTests.cs (3)
37var session = await webTransportFeature.AcceptAsync(CancellationToken.None).DefaultTimeout(); // todo session is null here 62await Http3Api.ServerReceivedSettingsReader.ReadAsync().DefaultTimeout(); 128await Http3Api.ServerReceivedSettingsReader.ReadAsync().DefaultTimeout();
Http3\WebTransport\WebTransportTestUtilities.cs (2)
35var session = await webTransportFeature.AcceptAsync(CancellationToken.None).DefaultTimeout(); 59await inMemory.ServerReceivedSettingsReader.ReadAsync().DefaultTimeout();
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (1)
113while (await reader.WaitToReadAsync().DefaultTimeout())
Interop.FunctionalTests (10)
HttpClientHttp2InteropTests.cs (10)
273var readResult = await reader.ReadAsync().DefaultTimeout(); 277readResult = await reader.ReadAsync().DefaultTimeout(); 282await context.Response.BodyWriter.WriteAsync(sequence.First).DefaultTimeout(); 286var finalResult = await reader.ReadAsync().DefaultTimeout(); 330var readResult = await reader.ReadAsync().DefaultTimeout(); 334readResult = await reader.ReadAsync().DefaultTimeout(); 339await context.Response.BodyWriter.WriteAsync(sequence.First).DefaultTimeout(); 346readResult = await reader.ReadAsync().DefaultTimeout(); 350readResult = await reader.ReadAsync().DefaultTimeout(); 357var finalResult = await reader.ReadAsync().DefaultTimeout();
Microsoft.AspNetCore.ConcurrencyLimiter.Tests (4)
PolicyTests\QueuePolicyTests.cs (4)
29Assert.True(await s.TryEnterAsync().DefaultTimeout()); 35Assert.True(await waitingTask.DefaultTimeout()); 67Assert.True(await s1.TryEnterAsync().DefaultTimeout()); 68Assert.True(await s2.TryEnterAsync().DefaultTimeout());
Microsoft.AspNetCore.Http.Connections.Tests (10)
HttpConnectionDispatcherTests.cs (10)
1297await connection.Transport.Output.WriteAsync(new byte[] { 1 }).DefaultTimeout(); 1336await connection.Transport.Output.WriteAsync(new byte[] { 1 }).DefaultTimeout(); 1380await connection.Transport.Output.WriteAsync(new byte[] { 1 }).DefaultTimeout(); 2223await c.Transport.Output.WriteAsync(Encoding.UTF8.GetBytes("Message1")).DefaultTimeout(); 2226await c.Transport.Output.WriteAsync(Encoding.UTF8.GetBytes("Message2")).DefaultTimeout(); 2982Assert.Equal(3, await pollContext.Response.Body.ReadAsync(memory).DefaultTimeout()); 2994Assert.Equal(3, await pollContext.Response.Body.ReadAsync(memory).DefaultTimeout()); 3039Assert.Equal(3, await pollContext.Response.Body.ReadAsync(memory).DefaultTimeout()); 3049Assert.Equal(3, await pollContext.Response.Body.ReadAsync(memory).DefaultTimeout()); 3171Assert.Equal(1, await context.Response.Body.ReadAsync(memory).DefaultTimeout());
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
RequestTests.cs (1)
564await httpContext.Request.Body.ReadAsync(new byte[10]).DefaultTimeout();
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (10)
ConcurrentPipeWriterTests.cs (10)
48await flushTask.DefaultTimeout(); 64await flushTask.DefaultTimeout(); 171await flushTask0.DefaultTimeout(); 172await flushTask1.DefaultTimeout(); 217await flushTask0.DefaultTimeout(); 242await flushTask1.DefaultTimeout(); 300await flushTask0.DefaultTimeout(); 381Assert.True((await flushTask0.DefaultTimeout()).IsCanceled); 382Assert.True((await flushTask1.DefaultTimeout()).IsCanceled); 393await flushTask2.DefaultTimeout();
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (55)
QuicConnectionContextTests.cs (24)
33var acceptTask = connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout(); 57var acceptTask = connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout(); 83var acceptTask = connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout(); 96var serverStream = await acceptStreamTask.DefaultTimeout(); 106serverStream = await acceptStreamTask.DefaultTimeout(); 109var read = await serverStream.Transport.Input.ReadAtLeastAsync(TestData.Length).DefaultTimeout(); 124var acceptTask = connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout(); 156await using var serverConnection = await connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout(); 198var serverConnection = await connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout(); 248var serverConnection = await connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout(); 256await using var clientStream = await acceptTask.DefaultTimeout(); 265while ((readCount = await clientStream.ReadAsync(buffer).DefaultTimeout()) != -1) 279readCount = await clientStream.ReadAsync(buffer).DefaultTimeout(); 293var serverConnection = await connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout(); 319await using var serverConnection = await connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout(); 362await using var serverConnection = await connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout(); 407await using var serverConnection = await connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout(); 456await using var serverConnection = await connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout(); 514await using var serverConnection = await connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout(); 568await using var serverConnection = await connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout(); 610var serverStream = await requestState.ServerConnection.AcceptAsync().DefaultTimeout(); 612var readResult = await serverStream.Transport.Input.ReadAtLeastAsync(TestData.Length).DefaultTimeout(); 673await using var serverConnection = await connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout(); 752await using var serverConnection = await connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout();
QuicConnectionListenerTests.cs (14)
38Assert.Null(await connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout()); 49var acceptTask = connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout(); 73var acceptTask1 = connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout(); 85var acceptTask2 = connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout(); 124var serverConnection = await connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout(); 180var acceptTask = connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout(); 263await using var clientConnection = await QuicConnection.ConnectAsync(options).DefaultTimeout(); 264await using var serverConnection = await acceptTask.DefaultTimeout(); 321await using var clientConnection = await QuicConnection.ConnectAsync(options).DefaultTimeout(); 322await using var serverConnection = await acceptTask.DefaultTimeout(); 363await using var serverConnection = await acceptTask.DefaultTimeout(); 364await using var clientConnection = await clientConnectionTask.DefaultTimeout(); 448var acceptTask = connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout(); 452await using var clientConnection = await QuicConnection.ConnectAsync(options).DefaultTimeout();
QuicStreamContextTests.cs (15)
40await using var serverConnection = await connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout(); 64await using var serverConnection = await connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout(); 112await using var serverConnection = await connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout(); 180await using var serverConnection = await connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout(); 237await using var serverConnection = await connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout(); 259await using var serverConnection = await connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout(); 303await using var serverConnection = await connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout(); 337await using var serverConnection = await connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout(); 376await using var serverConnection = await connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout(); 407await using var serverConnection = await connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout(); 423var readCount = await clientStream.ReadAsync(new byte[1024]).DefaultTimeout(); 448await using var serverConnection = await connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout(); 492await using var serverConnection = await connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout(); 542await using var serverConnection = await connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout(); 569await using var serverConnection = await connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout();
QuicTestHelpers.cs (2)
152var serverStream = await serverConnection.AcceptAsync().DefaultTimeout(); 155var readResult = await serverStream.Transport.Input.ReadAtLeastAsync(TestData.Length).DefaultTimeout();
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (4)
HubConnectionTests.Tracing.cs (2)
83clientActivity1 = await clientChannel.Reader.ReadAsync().DefaultTimeout(); 105clientActivity2 = await clientChannel.Reader.ReadAsync().DefaultTimeout();
HubProtocolVersionTests.cs (2)
134var connectionContext = await proxyConnectionFactory.ConnectTask.DefaultTimeout(); 144await connectionContext.Transport.Output.FlushAsync().DefaultTimeout();
Microsoft.AspNetCore.SignalR.Client.Tests (10)
HttpConnectionTests.ConnectionLifecycle.cs (1)
315await connection.Transport.Output.WriteAsync(new byte[] { 0x42 }).DefaultTimeout();
HttpConnectionTests.Transport.cs (3)
246await connection.Transport.Output.WriteAsync(data).DefaultTimeout(); 262() => connection.Transport.Output.WriteAsync(new byte[0]).DefaultTimeout()); 278() => connection.Transport.Output.WriteAsync(new byte[0]).DefaultTimeout());
HubConnectionTests.ConnectionLifecycle.cs (1)
626await innerConnection.Application.Output.WriteAsync(Encoding.UTF8.GetBytes(new[] { '{' })).DefaultTimeout();
HubConnectionTests.cs (4)
272await Assert.ThrowsAsync<TaskCanceledException>(() => result.GetAsyncEnumerator().MoveNextAsync().DefaultTimeout()); 301await task.DefaultTimeout(); 303while (await e.MoveNextAsync().DefaultTimeout()) 333await task.DefaultTimeout();
HubConnectionTests.Reconnect.cs (1)
920await currentTestConnection.Application.Output.WriteAsync(output.ToArray()).DefaultTimeout();
Microsoft.AspNetCore.SignalR.Tests (25)
EndToEndTests.cs (3)
193await connection.Transport.Output.WriteAsync(message).DefaultTimeout(); 279await connection.Transport.Output.WriteAsync(bytes).DefaultTimeout(); 336await connection.Transport.Output.WriteAsync(bytes).DefaultTimeout();
HubConnectionHandlerTests.Activity.cs (17)
54var connectActivity = await serverChannel.Reader.ReadAsync().DefaultTimeout(); 63var invocation1Activity = await serverChannel.Reader.ReadAsync().DefaultTimeout(); 69var invocation2Activity = await serverChannel.Reader.ReadAsync().DefaultTimeout(); 75var invocation3Activity = await serverChannel.Reader.ReadAsync().DefaultTimeout(); 78var userCodeActivity = await serverChannel.Reader.ReadAsync().DefaultTimeout(); 87var disconnectActivity = await serverChannel.Reader.ReadAsync().DefaultTimeout(); 129var connectActivity = await serverChannel.Reader.ReadAsync().DefaultTimeout(); 145var invocationActivity = await serverChannel.Reader.ReadAsync().DefaultTimeout(); 159var disconnectActivity = await serverChannel.Reader.ReadAsync().DefaultTimeout(); 200var connectActivity = await serverChannel.Reader.ReadAsync().DefaultTimeout(); 205var invocation1Activity = await serverChannel.Reader.ReadAsync().DefaultTimeout(); 210var invocation2Activity = await serverChannel.Reader.ReadAsync().DefaultTimeout(); 218var disconnectedActivity = await serverChannel.Reader.ReadAsync().DefaultTimeout(); 259var connectActivity = await serverChannel.Reader.ReadAsync().DefaultTimeout(); 271var invocationActivity = await serverChannel.Reader.ReadAsync().DefaultTimeout(); 285var disconnectActivity = await serverChannel.Reader.ReadAsync().DefaultTimeout(); 330var activity = await serverChannel.Reader.ReadAsync().DefaultTimeout();
HubConnectionHandlerTests.cs (2)
669await client.Connection.Application.Output.WriteAsync(payload).DefaultTimeout(); 3566await client.Connection.Application.Output.WriteAsync(Encoding.UTF8.GetBytes(new[] { '{' })).DefaultTimeout();
Internal\MessageBufferTests.cs (3)
34var res = await pipes.Application.Input.ReadAsync().DefaultTimeout(); 73res = await pipes.Application.Input.ReadAsync().DefaultTimeout(); 311res = await pipes.Application.Input.ReadAsync().DefaultTimeout();
Sockets.FunctionalTests (2)
src\Servers\Kestrel\test\FunctionalTests\UnixDomainSocketsTests.cs (2)
108var bytesReceived = await socket.ReceiveAsync(buffer.AsMemory(read, buffer.Length - read), SocketFlags.None).DefaultTimeout(); 176var bytesReceived = await socket.ReceiveAsync(readBuffer.AsMemory(read), SocketFlags.None).DefaultTimeout();