Skip to content

Commit 74582de

Browse files
authored
Merge pull request #2752 from sharwell/sequential-pool-testing
Avoid running object pool tests in parallel with other tests
2 parents 73e3b63 + 4c7a411 commit 74582de

3 files changed

Lines changed: 17 additions & 0 deletions

File tree

StyleCop.Analyzers/StyleCop.Analyzers.Test/HelperTests/ObjectPools/ObjectPoolTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ namespace StyleCop.Analyzers.Test.HelperTests.ObjectPools
77
using StyleCop.Analyzers.Helpers.ObjectPools;
88
using Xunit;
99

10+
[Collection(nameof(SequentialTestCollection))]
1011
public class ObjectPoolTests
1112
{
1213
[Fact]

StyleCop.Analyzers/StyleCop.Analyzers.Test/HelperTests/ObjectPools/SharedPoolsTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ namespace StyleCop.Analyzers.Test.HelperTests.ObjectPools
1010
using StyleCop.Analyzers.Helpers.ObjectPools;
1111
using Xunit;
1212

13+
[Collection(nameof(SequentialTestCollection))]
1314
public class SharedPoolsTests
1415
{
1516
[Fact]
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved.
2+
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
3+
4+
namespace StyleCop.Analyzers.Test
5+
{
6+
using Xunit;
7+
8+
/// <summary>
9+
/// Defines a collection for tests which cannot run in parallel with other tests.
10+
/// </summary>
11+
[CollectionDefinition(nameof(SequentialTestCollection), DisableParallelization = true)]
12+
internal sealed class SequentialTestCollection
13+
{
14+
}
15+
}

0 commit comments

Comments
 (0)