diff --git a/src/libraries/System.Formats.Nrbf/tests/EdgeCaseTests.cs b/src/libraries/System.Formats.Nrbf/tests/EdgeCaseTests.cs index 1d14993a0890c3..72f3b9aad9ad8a 100644 --- a/src/libraries/System.Formats.Nrbf/tests/EdgeCaseTests.cs +++ b/src/libraries/System.Formats.Nrbf/tests/EdgeCaseTests.cs @@ -61,15 +61,18 @@ public void ArraysOfStringsCanContainMemberReferences(FormatterTypeStyle typeFor } } - [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.Is64BitProcess))] + [ConditionalTheory] [InlineData(100)] [InlineData(64_001)] [InlineData(127_000)] -#if RELEASE && NET // it takes a lot of time to execute [InlineData(2147483591)] // Array.MaxLength -#endif public void CanReadArrayOfAnySize(int length) { + if (length == 2147483591 && (!PlatformDetection.Is64BitProcess || !PlatformDetection.IsReleaseRuntime || !PlatformDetection.IsNetCore)) + { + throw new SkipTestException("It would take too much time to execute."); + } + try { byte[] input = new byte[length];