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