Get free port starting from 8001 instead of using TcpListener.

Enable kestrel tests to run in parallel.
This commit is contained in:
Sridhar Periyasamy 2016-04-05 13:12:07 -07:00
parent 17b7d34bb9
commit dbb25d8fb3
4 changed files with 18 additions and 35 deletions

View file

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Threading;
namespace Microsoft.DotNet.Tools.Test.Utilities
{
public static class PortManager
{
private static int s_nextPort = 8001;
public static int GetPort()
{
return Interlocked.Increment(ref s_nextPort);
}
}
}