1 write to Http3Api
InMemory.FunctionalTests (1)
Http3\Http3TestBase.cs (1)
126Http3Api = new Http3InMemory(_serviceContext, _serviceContext.FakeTimeProvider, _mockTimeoutHandler.Object, LoggerFactory);
334 references to Http3Api
InMemory.FunctionalTests (334)
Http3\Http3ConnectionTests.cs (84)
39await Http3Api.InitializeConnectionAsync(async context => 52await Http3Api.CreateControlStream(); 53await Http3Api.GetInboundControlStream(); 55var requestStream = await Http3Api.CreateRequestStream(new[] 79await Http3Api.InitializeConnectionAsync(async context => 90await Http3Api.CreateControlStream(); 91await Http3Api.GetInboundControlStream(); 93var requestStream = await Http3Api.CreateRequestStream(new[] 139await Http3Api.InitializeConnectionAsync(async context => 153await Http3Api.CreateControlStream(); 154await Http3Api.GetInboundControlStream(); 155var requestStream = await Http3Api.CreateRequestStream(requestHeaders, endStream: true); 171await Http3Api.InitializeConnectionAsync(_echoApplication); 173var inboundControlStream = await Http3Api.GetInboundControlStream(); 178var request = await Http3Api.CreateRequestStream(Headers); 186Http3Api.CloseServerGracefully(); 188Assert.Null(await Http3Api.MultiplexedConnectionContext.AcceptAsync().DefaultTimeout()); 190await Http3Api.WaitForConnectionStopAsync(expectedStreamId, false, expectedErrorCode: Http3ErrorCode.NoError); 191MetricsAssert.NoError(Http3Api.ConnectionTags); 197await Http3Api.InitializeConnectionAsync(_echoApplication); 199var inboundControlStream = await Http3Api.GetInboundControlStream(); 202var activeRequest = await Http3Api.CreateRequestStream(Headers); 205Http3Api.CloseServerGracefully(); 207await Http3Api.WaitForGoAwayAsync(false, VariableLengthIntegerHelper.EightByteLimit); 210var rejectedRequest = await Http3Api.CreateRequestStream(Headers); 218Http3Api.MultiplexedConnectionContext.Abort(); 220await Http3Api.WaitForConnectionStopAsync(4, false, expectedErrorCode: Http3ErrorCode.NoError); 221MetricsAssert.NoError(Http3Api.ConnectionTags); 232await Http3Api.InitializeConnectionAsync(_echoApplication); 234var outboundcontrolStream = await Http3Api.CreateControlStream(); 240await Http3Api.GetInboundControlStream(); 242await Http3Api.WaitForConnectionErrorAsync<Http3ConnectionErrorException>( 248MetricsAssert.Equal(ConnectionEndReason.InvalidSettings, Http3Api.ConnectionTags); 257await Http3Api.InitializeConnectionAsync(_noopApplication); 259await Http3Api.CreateControlStream(streamId); 260await Http3Api.CreateControlStream(streamId); 262await Http3Api.WaitForConnectionErrorAsync<Http3ConnectionErrorException>( 268MetricsAssert.Equal(ConnectionEndReason.StreamCreationError, Http3Api.ConnectionTags); 277await Http3Api.InitializeConnectionAsync(_noopApplication); 279var controlStream = await Http3Api.CreateControlStream(); 284await Http3Api.WaitForConnectionErrorAsync<Http3ConnectionErrorException>( 290MetricsAssert.Equal(ConnectionEndReason.UnexpectedFrame, Http3Api.ConnectionTags); 296await Http3Api.InitializeConnectionAsync(_noopApplication); 298var controlStream = await Http3Api.CreateControlStream(id: 0); 306Http3Api.TriggerTick(); 307Http3Api.TriggerTick(TimeSpan.FromSeconds(1)); 309await Http3Api.WaitForConnectionErrorAsync<Http3ConnectionErrorException>( 315MetricsAssert.Equal(ConnectionEndReason.ClosedCriticalStream, Http3Api.ConnectionTags); 322await Http3Api.InitializeConnectionAsync(_noopApplication); 324var controlStream = await Http3Api.CreateControlStream(id: 0); 326var lifetime = Http3Api.MultiplexedConnectionContext.Features.Get<IConnectionLifetimeNotificationFeature>(); 336Http3Api.CloseServerGracefully(); 338await Http3Api.WaitForConnectionStopAsync(0, true, expectedErrorCode: Http3ErrorCode.NoError); 339MetricsAssert.NoError(Http3Api.ConnectionTags); 345await Http3Api.InitializeConnectionAsync(_noopApplication); 347var controlStream = await Http3Api.GetInboundControlStream(); 351Http3Api.TriggerTick(); 352Http3Api.TriggerTick(TimeSpan.FromSeconds(1)); 354await Http3Api.WaitForConnectionErrorAsync<Http3ConnectionErrorException>( 360MetricsAssert.Equal(ConnectionEndReason.ClosedCriticalStream, Http3Api.ConnectionTags); 366await Http3Api.InitializeConnectionAsync(_echoApplication); 368var inboundControlStream = await Http3Api.GetInboundControlStream(); 379var outboundcontrolStream = await Http3Api.CreateControlStream(); 385var maxFieldSetting = await Http3Api.ServerReceivedSettingsReader.ReadAsync().DefaultTimeout(); 402await Http3Api.InitializeConnectionAsync(_echoApplication); 424await Http3Api.InitializeConnectionAsync(async context => 469await Http3Api.InitializeConnectionAsync(_echoApplication); 503await Http3Api.InitializeConnectionAsync(_echoApplication); 539await Http3Api.InitializeConnectionAsync(requestDelegate); 564await Http3Api.InitializeConnectionAsync(context => 582var requestStream = await Http3Api.CreateRequestStream(requestHeaders, endStream: true); 602await Http3Api.InitializeConnectionAsync(async c => 630var requestStream = await Http3Api.CreateRequestStream(new[] 654await Http3Api.InitializeConnectionAsync(async c => 684var requestStream = await Http3Api.CreateRequestStream(new[] 720Http3Api.MultiplexedConnectionContext = new ThrowingMultiplexedConnectionContext(Http3Api, skipCount: 2, requestTcs, abortTcs); 721await Http3Api.InitializeConnectionAsync(_echoApplication); 723await Http3Api.CreateControlStream(); 724await Http3Api.GetInboundControlStream(); 725var requestStream = await Http3Api.CreateRequestStream(Headers, endStream: true); 736Http3Api.CloseServerGracefully(); 738var errorCodeFeature = Http3Api.MultiplexedConnectionContext.Features.Get<IProtocolErrorCodeFeature>(); 784var requestStream = await Http3Api.CreateRequestStream(headers, endStream: !sendData);
Http3\Http3StreamTests.cs (99)
33var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(_echoApplication, headers); 54var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(context => 77var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(_echoApplication, headers); 95var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(_echoApplication, headers); 113var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(_echoMethod, headers, endStream: true); 136var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(_echoApplication, headers); 150var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(_echoMethod, headers, endStream: true); 167var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(_echoPath, headers, endStream: true); 186var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(_echoPath, headers, endStream: true); 206var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(context => 241var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(context => 265var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(_noopApplication, headers, endStream: true); 282var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(_noopApplication, headers, endStream: true); 301var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(context => 326var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(_noopApplication, headers, endStream: true); 344var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(_noopApplication, headers, endStream: true); 364var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(_noopApplication, headers, endStream: true); 385var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(_echoHost, headers, endStream: true); 408var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(_echoHost, headers, endStream: true); 431var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(_echoHost, headers, endStream: true); 454var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(_echoHost, headers, endStream: true); 476var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(_noopApplication, headers, endStream: true); 496var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(_noopApplication, headers, endStream: true); 516var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(_noopApplication, headers, endStream: true); 537var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(_noopApplication, headers, endStream: true); 556var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(async context => 585var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(async context => 620var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(async context => 656var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(async context => 690var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(c => 720var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(async context => 761var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(async context => 795var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(async context => 828var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(context => 858var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(async context => 892var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(async context => 929var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(async context => 952var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(async context => 984var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(context => 1010var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(async context => 1041var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(async context => 1080var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(async context => 1107var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(context => 1135var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(async context => 1181var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(async context => 1233var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(async context => 1281var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(async context => 1334var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(async context => 1383var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(async context => 1435var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(async context => 1476var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(async context => 1536var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(async context => 1591var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(async context => 1649var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(async context => 1706var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(async context => 1765var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(async context => 1829var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(async context => 1892var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(async context => 1953Http3Api._serviceContext.ServerOptions.EnableWebTransportAndH3Datagrams = pendingStreamsEnabled; 1955var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(_noopApplication, null); 1981var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(async c => 2011var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(async c => 2031await Http3Api.WaitForConnectionErrorAsync<ConnectionAbortedException>( 2036MetricsAssert.Equal(ConnectionEndReason.UnexpectedFrame, Http3Api.ConnectionTags); 2054var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(async c => 2093Http3Api._serviceContext.ServerOptions.EnableWebTransportAndH3Datagrams = pendingStreamsEnabled; 2095var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(_echoApplication, null); 2106await Http3Api.WaitForConnectionErrorAsync<Http3ConnectionErrorException>( 2112MetricsAssert.Equal(ConnectionEndReason.UnexpectedFrame, Http3Api.ConnectionTags); 2126var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(_echoApplication, headers); 2137await Http3Api.WaitForConnectionErrorAsync<ConnectionAbortedException>( 2142MetricsAssert.Equal(ConnectionEndReason.UnexpectedFrame, Http3Api.ConnectionTags); 2148var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(_echoApplication, null); 2278var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(_noopApplication, headers, endStream: true); 2294var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(_noopApplication, headers, endStream: true); 2306var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(_noopApplication, headers, endStream: true); 2331var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(_notImplementedApp, headers, endStream: true); 2389var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(_notImplementedApp, headers, endStream: true); 2487var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(_noopApplication, headers, endStream: true); 2505var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(async context => 2539var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(async context => 2578var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(async context => 2611var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(async context => 2662var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(async context => 2714var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(async context => 2756await Http3Api.InitializeConnectionAsync(_noopApplication); 2758var outboundControlStream = await Http3Api.CreateControlStream().DefaultTimeout(); 2761var inboundControlStream = await Http3Api.GetInboundControlStream(); 2765var invalidStream = await Http3Api.CreateControlStream(typeId).DefaultTimeout(); 2772var requestStream = await Http3Api.CreateRequestStream(new[] 2787await Http3Api.InitializeConnectionAsync(context => 2793var outboundcontrolStream = await Http3Api.CreateControlStream(); 2799var maxFieldSetting = await Http3Api.ServerReceivedSettingsReader.ReadAsync().DefaultTimeout(); 2804var requestStream = await Http3Api.CreateRequestStream(new[] 2825var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(async context => 2897var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(c => 2937var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(c => 2970var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(c => 2992var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(async context =>
Http3\Http3TimeoutTests.cs (134)
23await Http3Api.InitializeConnectionAsync(_noopApplication).DefaultTimeout(); 25var controlStream = await Http3Api.GetInboundControlStream().DefaultTimeout(); 28Http3Api.AdvanceTime(limits.KeepAliveTimeout + TimeSpan.FromTicks(1)); 30await Http3Api.WaitForConnectionStopAsync(0, false, expectedErrorCode: Http3ErrorCode.NoError); 31MetricsAssert.Equal(ConnectionEndReason.KeepAliveTimeout, Http3Api.ConnectionTags); 39await Http3Api.InitializeConnectionAsync(_noopApplication).DefaultTimeout(); 40await Http3Api.CreateControlStream(); 42var controlStream = await Http3Api.GetInboundControlStream().DefaultTimeout(); 45Http3Api.AdvanceTime(limits.KeepAliveTimeout + TimeSpan.FromTicks(1)); 47await Http3Api.WaitForConnectionStopAsync(0, false, expectedErrorCode: Http3ErrorCode.NoError); 48MetricsAssert.Equal(ConnectionEndReason.KeepAliveTimeout, Http3Api.ConnectionTags); 63await Http3Api.InitializeConnectionAsync(_noopApplication).DefaultTimeout(); 65await Http3Api.CreateControlStream(); 66var controlStream = await Http3Api.GetInboundControlStream().DefaultTimeout(); 68var requestStream = await Http3Api.CreateRequestStream(requestHeaders, endStream: true); 74Http3Api.AdvanceTime(limits.KeepAliveTimeout + Heartbeat.Interval + TimeSpan.FromTicks(1)); 76await Http3Api.WaitForConnectionStopAsync(4, false, expectedErrorCode: Http3ErrorCode.NoError); 77MetricsAssert.Equal(ConnectionEndReason.KeepAliveTimeout, Http3Api.ConnectionTags); 94await Http3Api.InitializeConnectionAsync(_ => 100await Http3Api.CreateControlStream(); 101var controlStream = await Http3Api.GetInboundControlStream().DefaultTimeout(); 103var requestStream = await Http3Api.CreateRequestStream(requestHeaders, endStream: true); 107Http3Api.AdvanceTime(limits.KeepAliveTimeout); 108Http3Api.AdvanceTime(limits.KeepAliveTimeout); 109Http3Api.AdvanceTime(limits.KeepAliveTimeout); 110Http3Api.AdvanceTime(limits.KeepAliveTimeout); 111Http3Api.AdvanceTime(limits.KeepAliveTimeout); 120Http3Api.AdvanceTime(limits.KeepAliveTimeout + Heartbeat.Interval + TimeSpan.FromTicks(1)); 122await Http3Api.WaitForConnectionStopAsync(4, false, expectedErrorCode: Http3ErrorCode.NoError); 123MetricsAssert.Equal(ConnectionEndReason.KeepAliveTimeout, Http3Api.ConnectionTags); 133var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(_noopApplication, null).DefaultTimeout(); 135var controlStream = await Http3Api.GetInboundControlStream().DefaultTimeout(); 142var serverRequestStream = Http3Api.Connection._streams[requestStream.StreamId]; 144Http3Api.TriggerTick(); 145Http3Api.TriggerTick(limits.RequestHeadersTimeout); 149Http3Api.TriggerTick(TimeSpan.FromTicks(1)); 162Http3Api._serviceContext.ServerOptions.EnableWebTransportAndH3Datagrams = pendingStreamsEnabled; 174var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(_noopApplication, null).DefaultTimeout(); 176var controlStream = await Http3Api.GetInboundControlStream().DefaultTimeout(); 185serverRequestStream = Http3Api.Connection._unidentifiedStreams[requestStream.StreamId]; 191serverRequestStream = Http3Api.Connection._streams[requestStream.StreamId]; 194Http3Api.TriggerTick(); 195Http3Api.AdvanceTime(limits.RequestHeadersTimeout); 203Http3Api.AdvanceTime(TimeSpan.FromTicks(1)); 215Http3Api._serviceContext.ServerOptions.EnableWebTransportAndH3Datagrams = true; 221await Http3Api.InitializeConnectionAsync(_noopApplication).DefaultTimeout(); 223var controlStream = await Http3Api.GetInboundControlStream().DefaultTimeout(); 226var outboundControlStream = await Http3Api.CreateControlStream(id: null); 229var serverInboundControlStream = Http3Api.Connection._unidentifiedStreams[outboundControlStream.StreamId]; 231Http3Api.TriggerTick(); 232Http3Api.AdvanceTime(limits.RequestHeadersTimeout); 236Http3Api.AdvanceTime(TimeSpan.FromTicks(1)); 242Http3Api._serviceContext.ServerOptions.EnableWebTransportAndH3Datagrams = false; 246Http3Api._timeoutControl.Initialize(); 256await Http3Api.InitializeConnectionAsync(_noopApplication).DefaultTimeout(); 258var controlStream = await Http3Api.GetInboundControlStream().DefaultTimeout(); 261var outboundControlStream = await Http3Api.CreateControlStream(id: null); 265var serverInboundControlStream = Http3Api.Connection._streams[outboundControlStream.StreamId]; 267Http3Api.TriggerTick(); 268Http3Api.TriggerTick(limits.RequestHeadersTimeout); 272Http3Api.TriggerTick(TimeSpan.FromTicks(1)); 285await Http3Api.InitializeConnectionAsync(_noopApplication).DefaultTimeout(); 287var controlStream = await Http3Api.GetInboundControlStream().DefaultTimeout(); 290Http3Api.TriggerTick(); 291Http3Api.TriggerTick(limits.RequestHeadersTimeout + TimeSpan.FromTicks(1)); 293var outboundControlStream = await Http3Api.CreateControlStream(id: 0); 297Http3Api.TriggerTick(); 305Http3Api._serviceContext.ServerOptions.EnableWebTransportAndH3Datagrams = pendingStreamEnabled; 311await Http3Api.InitializeConnectionAsync(_noopApplication).DefaultTimeout(); 313var controlStream = await Http3Api.GetInboundControlStream().DefaultTimeout(); 316var outboundControlStream = await Http3Api.CreateControlStream(id: null); 322serverInboundControlStream = Http3Api.Connection._unidentifiedStreams[outboundControlStream.StreamId]; 327serverInboundControlStream = Http3Api.Connection._streams[outboundControlStream.StreamId]; 330Http3Api.TriggerTick(); 343Http3Api._timeoutControl.Initialize(); 345await Http3Api.InitializeConnectionAsync(_readRateApplication); 347var inboundControlStream = await Http3Api.GetInboundControlStream(); 351var requestStream = await Http3Api.CreateRequestStream(ReadRateRequestHeaders(_helloWorldBytes.Length), endStream: false); 359Http3Api.AdvanceTime(limits.MinRequestBodyDataRate.GracePeriod); 363Http3Api.AdvanceTime(TimeSpan.FromTicks(1)); 367await Http3Api.WaitForConnectionErrorAsync<ConnectionAbortedException>( 372MetricsAssert.Equal(ConnectionEndReason.MinRequestBodyDataRate, Http3Api.ConnectionTags); 385await Http3Api.InitializeConnectionAsync(_noopApplication); 387var inboundControlStream = await Http3Api.GetInboundControlStream(); 390var requestStream = await Http3Api.CreateRequestStream(new[] 400Http3Api.TriggerTick(); 403Http3Api.TriggerTick(TimeSpan.FromTicks(1)); 406Http3Api.TriggerTick(limits.MinResponseDataRate.GracePeriod); 410await Http3Api.WaitForConnectionErrorAsync<Http3ConnectionErrorException>( 416MetricsAssert.Equal(ConnectionEndReason.MinResponseDataRate, Http3Api.ConnectionTags); 456Http3Api._timeoutControl.Initialize(); 459var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(app.RunApp, _browserRequestHeaders, endStream: false); 467Http3Api._timeoutControl.Tick(fakeTimeProvider.GetTimestamp()); 470Http3Api.AdvanceTime(TimeSpan.FromSeconds((requestStream.BytesReceived + _helloWorldBytes.Length) / limits.MinResponseDataRate.BytesPerSecond) + 475Http3Api.AdvanceTime(TimeSpan.FromSeconds(1)); 498Http3Api._timeoutControl.Initialize(); 501var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(app.RunApp, _browserRequestHeaders, endStream: false); 509Http3Api._timeoutControl.Tick(fakeTimeProvider.GetTimestamp()); 515Http3Api.AdvanceTime(timeToWriteMaxData); 519Http3Api.AdvanceTime(TimeSpan.FromSeconds(1)); 537Http3Api._timeoutControl.Initialize(); 539await Http3Api.InitializeConnectionAsync(_readRateApplication); 541var inboundControlStream = await Http3Api.GetInboundControlStream(); 545var requestStream = await Http3Api.CreateRequestStream(ReadRateRequestHeaders(_maxData.Length), endStream: false); 557Http3Api.AdvanceTime(timeToReadMaxData); 561Http3Api.AdvanceTime(TimeSpan.FromSeconds(1)); 565await Http3Api.WaitForConnectionErrorAsync<ConnectionAbortedException>( 570MetricsAssert.Equal(ConnectionEndReason.MinRequestBodyDataRate, Http3Api.ConnectionTags); 583Http3Api._timeoutControl.Initialize(); 585await Http3Api.InitializeConnectionAsync(_readRateApplication); 587var inboundControlStream = await Http3Api.GetInboundControlStream(); 591var requestStream1 = await Http3Api.CreateRequestStream(ReadRateRequestHeaders(_maxData.Length), endStream: false); 597var requestStream2 = await Http3Api.CreateRequestStream(ReadRateRequestHeaders(_maxData.Length), endStream: false); 612Http3Api.AdvanceTime(timeToReadMaxData); 616Http3Api.AdvanceTime(TimeSpan.FromSeconds(1)); 620await Http3Api.WaitForConnectionErrorAsync<ConnectionAbortedException>( 625MetricsAssert.Equal(ConnectionEndReason.MinRequestBodyDataRate, Http3Api.ConnectionTags); 638Http3Api._timeoutControl.Initialize(); 640await Http3Api.InitializeConnectionAsync(_readRateApplication); 642var inboundControlStream = await Http3Api.GetInboundControlStream(); 648var requestStream1 = await Http3Api.CreateRequestStream(ReadRateRequestHeaders(_maxData.Length), endStream: false); 657var requestStream2 = await Http3Api.CreateRequestStream(ReadRateRequestHeaders(_maxData.Length), endStream: false); 668Http3Api.AdvanceTime(timeToReadMaxData); 672Http3Api.AdvanceTime(TimeSpan.FromSeconds(1)); 676await Http3Api.WaitForConnectionErrorAsync<ConnectionAbortedException>( 681MetricsAssert.Equal(ConnectionEndReason.MinRequestBodyDataRate, Http3Api.ConnectionTags); 694Http3Api._timeoutControl.Initialize(); 696await Http3Api.InitializeConnectionAsync(context => 703var inboundControlStream = await Http3Api.GetInboundControlStream(); 706Http3Api.OutboundControlStream = await Http3Api.CreateControlStream(); 709var requestStream = await Http3Api.CreateRequestStream(ReadRateRequestHeaders(_helloWorldBytes.Length), endStream: false); 717Http3Api.AdvanceTime(limits.MinRequestBodyDataRate.GracePeriod); 721Http3Api.AdvanceTime(TimeSpan.FromTicks(1));
Http3\WebTransport\WebTransportHandshakeTests.cs (10)
26await Http3Api.InitializeConnectionAsync(async context => 50var controlStream = await Http3Api.CreateControlStream(); 51var controlStream2 = await Http3Api.GetInboundControlStream(); 62await Http3Api.ServerReceivedSettingsReader.ReadAsync().DefaultTimeout(); 66var requestStream = await Http3Api.CreateRequestStream(new[] 115await Http3Api.InitializeConnectionAsync(_noopApplication); 116var controlStream = await Http3Api.CreateControlStream(); 117var controlStream2 = await Http3Api.GetInboundControlStream(); 128await Http3Api.ServerReceivedSettingsReader.ReadAsync().DefaultTimeout(); 138var requestStream = await Http3Api.CreateRequestStream(headersConnectFrame);
Http3\WebTransport\WebTransportSessionTests.cs (7)
15Http3Api._serviceContext.ServerOptions.EnableWebTransportAndH3Datagrams = true; 19var session = await WebTransportTestUtilities.GenerateSession(Http3Api, exitTcs); 36Http3Api._serviceContext.ServerOptions.EnableWebTransportAndH3Datagrams = true; // TODO add more sync code as now it is flaky 39var session = await WebTransportTestUtilities.GenerateSession(Http3Api, exitTcs); 71Http3Api._serviceContext.ServerOptions.EnableWebTransportAndH3Datagrams = true; 74var session = await WebTransportTestUtilities.GenerateSession(Http3Api, exitTcs); 88Http3Api.Connection._streams[session.SessionId].Abort(new(), System.Net.Http.Http3ErrorCode.InternalError);