192 references to Utilities
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (192)
Listener\AuthenticationOnExistingQueueTests.cs (9)
62
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout);
85
var contextTask = server.AcceptAsync(
Utilities
.DefaultTimeout); // Fails when the server shuts down, the challenge happens internally.
103
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout);
128
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout);
153
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout);
160
context = await server.AcceptAsync(
Utilities
.DefaultTimeout);
183
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout);
197
var server =
Utilities
.CreateDynamicHttpServer("/baseServer", out var root, out var baseAddress);
207
var server =
Utilities
.CreateServer(options =>
Listener\RequestBodyTests.cs (14)
23
using (var server =
Utilities
.CreateHttpServer(out address))
29
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
49
using (var server =
Utilities
.CreateHttpServer(out address))
53
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
74
using (var server =
Utilities
.CreateHttpServer(out address))
78
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
98
using (var server =
Utilities
.CreateHttpServer(out address))
102
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
123
using (var server =
Utilities
.CreateHttpServer(out address))
127
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
148
using (var server =
Utilities
.CreateHttpServer(out address))
152
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
175
using (var server =
Utilities
.CreateHttpServer(out address))
180
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
Listener\RequestHeaderTests.cs (13)
22
using (var server =
Utilities
.CreateHttpServer(out address))
27
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout);
63
using (var server =
Utilities
.CreateHttpServer(out address))
68
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout);
90
using (var server =
Utilities
.CreateHttpServer(out address))
95
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout);
117
using (var server =
Utilities
.CreateHttpServer(out address))
123
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout);
145
using (var server =
Utilities
.CreateHttpServer(out address))
159
using (var server =
Utilities
.CreateHttpServer(out address))
164
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout);
184
using (var server =
Utilities
.CreateHttpServer(out address))
189
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout);
Listener\RequestTests.cs (12)
21
using (var server =
Utilities
.CreateHttpServerReturnRoot("/", out root))
24
var contextTask = server.AcceptAsync(
Utilities
.DefaultTimeout);
35
using (var server =
Utilities
.CreateHttpServerReturnRoot("/", out root))
38
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
73
using (var server =
Utilities
.CreateHttpServerReturnRoot("/", out root))
76
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
98
using (var server =
Utilities
.CreateHttpServerReturnRoot("/", out root))
101
var contextTask = server.AcceptAsync(
Utilities
.DefaultTimeout);
123
using (var server =
Utilities
.CreateHttpServerReturnRoot("/", out root))
126
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
161
using var server =
Utilities
.CreateHttpServerReturnRoot(pathBase, out var root);
163
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
Listener\ResponseBodyTests.cs (63)
23
using (var server =
Utilities
.CreateHttpServer(out address))
27
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
56
using (var server =
Utilities
.CreateHttpServer(out address))
61
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
80
using (var server =
Utilities
.CreateHttpServer(out address))
85
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
105
using (var server =
Utilities
.CreateHttpServer(out address))
109
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
126
using (var server =
Utilities
.CreateHttpServer(out address))
130
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
148
using (var server =
Utilities
.CreateHttpServer(out address))
153
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
169
using (var server =
Utilities
.CreateHttpServer(out address))
173
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
189
using (var server =
Utilities
.CreateHttpServer(out address))
194
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
212
using (var server =
Utilities
.CreateHttpServer(out address))
216
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
234
using (var server =
Utilities
.CreateHttpServer(out address))
241
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
254
for (int i = 0; i <
Utilities
.WriteRetryLimit; i++)
256
context.Response.Body.Write(
Utilities
.WriteBuffer, 0,
Utilities
.WriteBuffer.Length);
261
Assert.Throws<ObjectDisposedException>(() => context.Response.Body.Write(
Utilities
.WriteBuffer, 0,
Utilities
.WriteBuffer.Length));
271
using (var server =
Utilities
.CreateHttpServer(out address))
277
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
290
for (int i = 0; i <
Utilities
.WriteRetryLimit; i++)
292
await context.Response.Body.WriteAsync(
Utilities
.WriteBuffer, 0,
Utilities
.WriteBuffer.Length);
297
await Assert.ThrowsAsync<ObjectDisposedException>(() => context.Response.Body.WriteAsync(
Utilities
.WriteBuffer, 0,
Utilities
.WriteBuffer.Length));
307
using (var server =
Utilities
.CreateHttpServer(out address))
313
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
323
for (int i = 0; i <
Utilities
.WriteRetryLimit; i++)
325
context.Response.Body.Write(
Utilities
.WriteBuffer, 0,
Utilities
.WriteBuffer.Length);
335
using (var server =
Utilities
.CreateHttpServer(out address))
340
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
350
for (int i = 0; i <
Utilities
.WriteRetryLimit; i++)
352
await context.Response.Body.WriteAsync(
Utilities
.WriteBuffer, 0,
Utilities
.WriteBuffer.Length);
362
using (var server =
Utilities
.CreateHttpServer(out address))
370
context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
388
for (int i = 0; i <
Utilities
.WriteRetryLimit; i++)
390
context.Response.Body.Write(
Utilities
.WriteBuffer, 0,
Utilities
.WriteBuffer.Length);
402
using (var server =
Utilities
.CreateHttpServer(out address))
410
context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
427
for (int i = 0; i <
Utilities
.WriteRetryLimit; i++)
429
await context.Response.Body.WriteAsync(
Utilities
.WriteBuffer, 0,
Utilities
.WriteBuffer.Length);
441
using (var server =
Utilities
.CreateHttpServer(out address))
449
context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
464
for (int i = 0; i <
Utilities
.WriteRetryLimit; i++)
466
context.Response.Body.Write(
Utilities
.WriteBuffer, 0,
Utilities
.WriteBuffer.Length);
476
using (var server =
Utilities
.CreateHttpServer(out address))
483
context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
498
for (int i = 0; i <
Utilities
.WriteRetryLimit; i++)
500
await context.Response.Body.WriteAsync(
Utilities
.WriteBuffer, 0,
Utilities
.WriteBuffer.Length);
508
using (HttpClient client = new HttpClient() { Timeout =
Utilities
.DefaultTimeout })
Listener\ResponseHeaderTests.cs (25)
31
using (var server =
Utilities
.CreateHttpServer(out address))
35
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
53
using (var server =
Utilities
.CreateHttpServer(out address))
57
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
76
using (var server =
Utilities
.CreateHttpServer(out address))
80
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
94
context = await server.AcceptAsync(
Utilities
.DefaultTimeout);
104
using (var server =
Utilities
.CreateHttpServer(out address))
108
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
123
context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
133
using (var server =
Utilities
.CreateHttpServer(out address))
137
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
152
context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
162
using (var server =
Utilities
.CreateHttpServer(out address))
166
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
185
using (var server =
Utilities
.CreateHttpServer(out address))
189
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
204
context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
214
using (var server =
Utilities
.CreateHttpServer(out address))
229
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
239
context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
257
using (var server =
Utilities
.CreateHttpServer(out address))
261
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
297
using (var server =
Utilities
.CreateHttpServer(out address))
301
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
Listener\ServerOnExistingQueueTests.cs (41)
21
using var baseServer =
Utilities
.CreateHttpServer(out var address);
22
using var server =
Utilities
.CreateServerOnExistingQueue(baseServer.Options.RequestQueueName);
26
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout);
36
using var baseServer =
Utilities
.CreateHttpServer(out var address);
37
using var server =
Utilities
.CreateServerOnExistingQueue(baseServer.Options.RequestQueueName);
41
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout);
55
using var baseServer =
Utilities
.CreateHttpServer(out var address);
56
using var server =
Utilities
.CreateServerOnExistingQueue(baseServer.Options.RequestQueueName);
60
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout);
77
using var baseServer =
Utilities
.CreateHttpServer(out var address);
78
using var server =
Utilities
.CreateServerOnExistingQueue(baseServer.Options.RequestQueueName);
82
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout);
92
using var baseServer =
Utilities
.CreateDynamicHttpServer("/PathBase", out var root, out var address);
93
using var server =
Utilities
.CreateServerOnExistingQueue(baseServer.Options.RequestQueueName);
98
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
110
using var baseServer =
Utilities
.CreateDynamicHttpServer("/PathBase", out var root, out var address);
111
using var server =
Utilities
.CreateServerOnExistingQueue(baseServer.Options.RequestQueueName);
115
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
134
using var baseServer =
Utilities
.CreateDynamicHttpServer(pathBase, out var root, out var baseAddress);
135
using var server =
Utilities
.CreateServerOnExistingQueue(baseServer.Options.RequestQueueName);
140
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
152
using var baseServer =
Utilities
.CreateDynamicHttpServer("/basepath", out var root, out var baseAddress);
154
using var server =
Utilities
.CreateServerOnExistingQueue(baseServer.Options.RequestQueueName);
160
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
173
using var baseServer =
Utilities
.CreateHttpServer(out var address);
174
using var server =
Utilities
.CreateServerOnExistingQueue(baseServer.Options.RequestQueueName);
179
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
193
context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
206
using var baseServer =
Utilities
.CreateHttpServer(out var address);
207
using var server =
Utilities
.CreateServerOnExistingQueue(baseServer.Options.RequestQueueName);
215
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
228
context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
252
using var server =
Utilities
.CreateServer(options =>
263
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout);
273
using var baseServer =
Utilities
.CreateHttpServer(out var address);
274
using var server =
Utilities
.CreateServer(options =>
283
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout);
293
using var baseServer =
Utilities
.CreateHttpServerReturnRoot("/baseServer", out string rootAddress);
294
using var server =
Utilities
.CreateServer(options =>
303
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout);
311
context = await server.AcceptAsync(
Utilities
.DefaultTimeout);
Listener\ServerTests.cs (15)
28
using (var server =
Utilities
.CreateHttpServer(out address))
34
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
57
using (var server =
Utilities
.CreateHttpServer(out address))
63
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
87
using (var server =
Utilities
.CreateHttpServer(out address))
91
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
115
using (var server =
Utilities
.CreateHttpServer(out string address))
120
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
131
using var server1 =
Utilities
.CreateHttpServer(out var address1);
147
using (var server =
Utilities
.CreateHttpServer(out address))
151
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
164
context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
178
using (var server =
Utilities
.CreateHttpServer(out address))
184
var context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);
196
context = await server.AcceptAsync(
Utilities
.DefaultTimeout).Before(responseTask);