Get free port starting from 8001 instead of using TcpListener.
Enable kestrel tests to run in parallel.
This commit is contained in:
parent
17b7d34bb9
commit
dbb25d8fb3
4 changed files with 18 additions and 35 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue