Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit f36a1ce

Browse files
committed
Fix outer loop PLINQ tests faiing to find member data
Fallout from the xunit upgrade. Some member data functions couldn't be found because their array types didn't match.
1 parent 4ff02e9 commit f36a1ce

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/System.Linq.Parallel/tests/DegreeOfParallelismTests.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ public class DegreeOfParallelismTests
1616
// If ThreadPool becomes available, uncomment the below
1717
//private static ThreadPoolManager _poolManager = new ThreadPoolManager();
1818

19-
public static IEnumerable<object[]> DegreeData(object[] counts, object[] degrees)
19+
public static IEnumerable<object[]> DegreeData(int[] counts, int[] degrees)
2020
{
2121
foreach (object[] results in UnorderedSources.Ranges(counts.Cast<int>(), x => degrees.Cast<int>().DefaultIfEmpty(x)))
2222
{
2323
yield return results;
2424
}
2525
}
2626

27-
public static IEnumerable<object[]> NotLoadBalancedDegreeData(object[] counts, object[] degrees)
27+
public static IEnumerable<object[]> NotLoadBalancedDegreeData(int[] counts, int[] degrees)
2828
{
2929
foreach (object[] results in DegreeData(counts, degrees))
3030
{
@@ -53,7 +53,7 @@ public static void DegreeOfParallelism(Labeled<ParallelQuery<int>> labeled, int
5353
}
5454

5555
[Theory]
56-
[MemberData("DegreeData", new[] { 1, 4, 32 }, new object[] { })]
56+
[MemberData("DegreeData", new[] { 1, 4, 32 }, new int[] { })]
5757
[OuterLoop]
5858
public static void DegreeOfParallelism_Barrier(Labeled<ParallelQuery<int>> labeled, int count, int degree)
5959
{
@@ -79,7 +79,7 @@ public static void DegreeOfParallelism_Pipelining(Labeled<ParallelQuery<int>> la
7979
}
8080

8181
[Theory]
82-
[MemberData("DegreeData", new[] { 1, 4 }, new object[] { })]
82+
[MemberData("DegreeData", new[] { 1, 4 }, new int[] { })]
8383
[MemberData("DegreeData", new[] { 32 }, new[] { 4 })]
8484
// Without the ability to ask the thread pool to create a minimum number of threads ahead of time,
8585
// higher thread counts take a prohibitive amount of time spooling them up.
@@ -100,7 +100,7 @@ public static void DegreeOfParallelism_Throttled_Pipelining(Labeled<ParallelQuer
100100
}
101101

102102
[Theory]
103-
[MemberData("NotLoadBalancedDegreeData", new[] { 1, 4 }, new object[] { })]
103+
[MemberData("NotLoadBalancedDegreeData", new[] { 1, 4 }, new int[] { })]
104104
[MemberData("NotLoadBalancedDegreeData", new[] { 32, 512, 1024 }, new[] { 4, 16 })]
105105
[OuterLoop]
106106
public static void DegreeOfParallelism_Aggregate_Accumulator(Labeled<ParallelQuery<int>> labeled, int count, int degree)
@@ -118,7 +118,7 @@ public static void DegreeOfParallelism_Aggregate_Accumulator(Labeled<ParallelQue
118118
}
119119

120120
[Theory]
121-
[MemberData("NotLoadBalancedDegreeData", new[] { 1, 4 }, new object[] { })]
121+
[MemberData("NotLoadBalancedDegreeData", new[] { 1, 4 }, new int[] { })]
122122
[MemberData("NotLoadBalancedDegreeData", new[] { 32, 512, 1024 }, new[] { 4, 16 })]
123123
[OuterLoop]
124124
public static void DegreeOfParallelism_Aggregate_SeedFunction(Labeled<ParallelQuery<int>> labeled, int count, int degree)

0 commit comments

Comments
 (0)