Skip to content

Commit 7ca7468

Browse files
committed
Put PortReserver users into an xUnit collection
1 parent 8e12737 commit 7ca7468

File tree

5 files changed

+9
-0
lines changed

5 files changed

+9
-0
lines changed

test/Microsoft.TestCommon/PortReserver.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212

1313
namespace Microsoft.TestCommon
1414
{
15+
[Xunit.CollectionDefinition("PortReserver Collection", DisableParallelization = true)]
16+
public class PortReserverCollection
17+
{
18+
}
19+
1520
/// <summary>
1621
/// This class allocates ports while ensuring that:
1722
/// 1. Ports that are permanently taken (or taken for the duration of the test) are not being attempted to be used.

test/System.Web.Http.Owin.Test/OwinHostIntegrationTest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
namespace System.Web.Http.Owin
1414
{
15+
[Xunit.Collection("PortReserver Collection")] // Avoid conflicts between different PortReserver consumers.
1516
public class OwinHostIntegrationTest
1617
{
1718
[Fact]

test/System.Web.Http.SelfHost.Test/Authentication/BasicOverHttpTest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
namespace System.Web.Http
1212
{
13+
[Xunit.Collection("PortReserver Collection")] // Avoid conflicts between different PortReserver consumers.
1314
public class BasicOverHttpTest
1415
{
1516
[Fact]

test/System.Web.Http.SelfHost.Test/HttpSelfHostResponseTest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
namespace System.Web.Http.SelfHost
1414
{
15+
[Xunit.Collection("PortReserver Collection")] // Avoid conflicts between different PortReserver consumers.
1516
public class HttpSelfHostResponseTest
1617
{
1718
[Fact]

test/System.Web.Http.SelfHost.Test/HttpSelfHostServerTest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
namespace System.Web.Http.SelfHost
2020
{
21+
[Xunit.Collection("PortReserver Collection")] // Avoid conflicts between different PortReserver consumers.
2122
public class HttpSelfHostServerTest : IDisposable
2223
{
2324
private HttpSelfHostServer server = null;

0 commit comments

Comments
 (0)