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