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

Commit 3351e61

Browse files
committed
Merge pull request #2612 from stephentoub/plinq_modes_tests
Fix PLINQ modes tests to not timeout
2 parents f53a71d + 40779a5 commit 3351e61

File tree

2 files changed

+105
-158
lines changed

2 files changed

+105
-158
lines changed

src/System.Linq.Parallel/tests/Helpers/Functions.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) Microsoft. All rights reserved.
22
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
33
using System;
4+
using System.Collections.Generic;
45
using System.Threading;
56
using Xunit;
67

@@ -40,5 +41,10 @@ public static void AssertIsCanceled(CancellationTokenSource source, Action query
4041
OperationCanceledException oce = Assert.Throws<OperationCanceledException>(query);
4142
Assert.Equal(source.Token, oce.CancellationToken);
4243
}
44+
45+
public static void Enumerate<T>(this IEnumerable<T> e)
46+
{
47+
foreach (var x in e) { }
48+
}
4349
}
4450
}

0 commit comments

Comments
 (0)