From 5a02633884b70ec5c4eabfa9d070ff54c220f264 Mon Sep 17 00:00:00 2001 From: Buyaa Namnan Date: Thu, 5 Aug 2021 08:59:52 -0700 Subject: [PATCH] Fix failling stress test (#56859) --- .../System.Runtime/tests/System/Reflection/ModuleTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libraries/System.Runtime/tests/System/Reflection/ModuleTests.cs b/src/libraries/System.Runtime/tests/System/Reflection/ModuleTests.cs index 8c42d79063f31..7ebf93afcc3fe 100644 --- a/src/libraries/System.Runtime/tests/System/Reflection/ModuleTests.cs +++ b/src/libraries/System.Runtime/tests/System/Reflection/ModuleTests.cs @@ -232,14 +232,14 @@ public void GetMethod() [Fact] [ActiveIssue("https://github.com/dotnet/runtime/issues/51912", typeof(PlatformDetection), nameof(PlatformDetection.IsBuiltWithAggressiveTrimming), nameof(PlatformDetection.IsBrowser))] - [ActiveIssue("https://github.com/dotnet/runtime/issues/50831")] public void GetMethods() { var methodNames = TestModule.GetMethods().Select(m => m.Name).ToArray(); AssertExtensions.SequenceEqual(new[]{ "TestMethodFoo", "TestMethodFoo" }, methodNames ); methodNames = TestModule.GetMethods(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static).Select(m => m.Name).ToArray(); - AssertExtensions.SequenceEqual(new[]{ "TestMethodFoo", "TestMethodFoo", "TestMethodBar" }, methodNames ); + Array.Sort(methodNames); + AssertExtensions.SequenceEqual(new[]{ "TestMethodBar", "TestMethodFoo", "TestMethodFoo" }, methodNames ); } public static IEnumerable Types => Module.GetTypes();