Addresses the occasional timeouts in System.Linq tests. The last 3-4 iterations of ToArrayShouldWorkWithSpecialLengthLazyEnumerables take
between 20 - 56 seconds each and likely trigger longer GC runs.
Fixes https://github.com/dotnet/runtime/issues/41114
Co-authored-by: Steve Pfister <steve.pfister@microsoft.com>
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
public static IEnumerable<object[]> ToArrayShouldWorkWithSpecialLengthLazyEnumerables_MemberData()
{
// Return array sizes that should be small enough not to OOM
- const int MaxPower = 18;
+ int MaxPower = PlatformDetection.IsBrowser ? 15 : 18;
yield return new object[] { 1 };
yield return new object[] { 2 };
for (int i = 2; i <= MaxPower; i++)