diff --git a/UnitTests/UnitTests.HighPerformance.Shared/Extensions/Test_ReadOnlySpanExtensions.Count.cs b/UnitTests/UnitTests.HighPerformance.Shared/Extensions/Test_ReadOnlySpanExtensions.Count.cs index 4ab680f5a5e..3966aacc503 100644 --- a/UnitTests/UnitTests.HighPerformance.Shared/Extensions/Test_ReadOnlySpanExtensions.Count.cs +++ b/UnitTests/UnitTests.HighPerformance.Shared/Extensions/Test_ReadOnlySpanExtensions.Count.cs @@ -62,7 +62,12 @@ public void Test_ReadOnlySpanExtensions_RandomCountManaged() { var value = new Int(37438941); - foreach (var count in TestCounts) + // We can skip the most expensive test in this case, as we're not testing + // a SIMD enabled path. The last test requires a very high memory usage which + // sometimes causes the CI test runner to fail with an out of memory exception. + // Since we don't need to double check overflows in the managed case, which is + // just a classic linear loop with some optimizations, omitting this case is fine. + foreach (var count in TestCounts.Slice(0, TestCounts.Length - 1)) { var random = new Random(count);