Rearranging test port allocations to avoid test race conditions #152
This commit is contained in:
parent
092f689c6a
commit
8c800fbd0f
|
|
@ -27,6 +27,9 @@ namespace Microsoft.AspNet.Server.WebListener
|
||||||
{
|
{
|
||||||
internal static class Utilities
|
internal static class Utilities
|
||||||
{
|
{
|
||||||
|
// When tests projects are run in parallel, overlapping port ranges can cause a race condition when looking for free
|
||||||
|
// ports during dynamic port allocation. To avoid this, make sure the port range here is different from the range in
|
||||||
|
// Microsoft.Net.Http.Server.
|
||||||
private const int BasePort = 5001;
|
private const int BasePort = 5001;
|
||||||
private const int MaxPort = 8000;
|
private const int MaxPort = 8000;
|
||||||
private static int NextPort = BasePort;
|
private static int NextPort = BasePort;
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,11 @@ namespace Microsoft.Net.Http.Server
|
||||||
{
|
{
|
||||||
internal static class Utilities
|
internal static class Utilities
|
||||||
{
|
{
|
||||||
private const int BasePort = 5001;
|
// When tests projects are run in parallel, overlapping port ranges can cause a race condition when looking for free
|
||||||
private const int MaxPort = 8000;
|
// ports during dynamic port allocation. To avoid this, make sure the port range here is different from the range in
|
||||||
|
// Microsoft.AspNet.Server.WebListener.
|
||||||
|
private const int BasePort = 8001;
|
||||||
|
private const int MaxPort = 11000;
|
||||||
private static int NextPort = BasePort;
|
private static int NextPort = BasePort;
|
||||||
private static object PortLock = new object();
|
private static object PortLock = new object();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue