Skip to content
This repository was archived by the owner on Mar 19, 2019. It is now read-only.

Commit 8d096cc

Browse files
committed
React to HttpContextFactory constructor change
- see pull aspnet/HttpAbstractions#594 and issue aspnet/HttpAbstractions#561
1 parent 4052c26 commit 8d096cc

File tree

1 file changed

+6
-4
lines changed
  • test/Microsoft.AspNetCore.Server.WebListener.FunctionalTests

1 file changed

+6
-4
lines changed

test/Microsoft.AspNetCore.Server.WebListener.FunctionalTests/Utilities.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,25 @@
1818
using System;
1919
using Microsoft.AspNetCore.Hosting.Server;
2020
using Microsoft.AspNetCore.Http;
21-
using Microsoft.AspNetCore.Http.Features;
2221
using Microsoft.AspNetCore.Http.Internal;
2322
using Microsoft.AspNetCore.Server.Features;
23+
using Microsoft.Extensions.ObjectPool;
2424
using Microsoft.Net.Http.Server;
2525

2626
namespace Microsoft.AspNetCore.Server.WebListener
2727
{
2828
internal static class Utilities
2929
{
30-
// When tests projects are run in parallel, overlapping port ranges can cause a race condition when looking for free
31-
// ports during dynamic port allocation. To avoid this, make sure the port range here is different from the range in
30+
// When tests projects are run in parallel, overlapping port ranges can cause a race condition when looking for free
31+
// ports during dynamic port allocation. To avoid this, make sure the port range here is different from the range in
3232
// Microsoft.Net.Http.Server.
3333
private const int BasePort = 5001;
3434
private const int MaxPort = 8000;
3535
private static int NextPort = BasePort;
3636
private static object PortLock = new object();
37-
private static IHttpContextFactory Factory = new HttpContextFactory(new HttpContextAccessor());
37+
private static IHttpContextFactory Factory = new HttpContextFactory(
38+
new DefaultObjectPoolProvider(),
39+
new HttpContextAccessor());
3840

3941
internal static IServer CreateHttpServer(out string baseAddress, RequestDelegate app)
4042
{

0 commit comments

Comments
 (0)