Temporary fix for Abort() related CoreCLR 7.0 tests.
authorMikhail Kurinnoi <m.kurinnoi@samsung.com>
Thu, 13 Apr 2023 13:20:34 +0000 (16:20 +0300)
committerGleb Balykov/Advanced System SW Lab /SRR/Staff Engineer/Samsung Electronics <g.balykov@samsung.com>
Tue, 25 Apr 2023 18:28:08 +0000 (21:28 +0300)
CoreCLR 7.0 have issue with abortable internal native code.
https://github.com/dotnet/runtime/issues/82422

test-suite/MITestVariables/Program.cs
test-suite/VSCodeTestVariables/Program.cs

index 124632c12c2a043999c22f78e20e81b87fe41f8a..0a47e3ac64294b519e215616e24783ac821a3d02 100644 (file)
@@ -458,7 +458,17 @@ namespace MITestVariables
         {
             get
             {
-                System.Threading.Thread.Sleep(5000000);
+                // CoreCLR 7.0 have issue with abortable internal native code.
+                // https://github.com/dotnet/runtime/issues/82422
+                if (System.Environment.Version.Major == 7)
+                {
+                    while (true)
+                    {
+                        System.Threading.Thread.Sleep(100);
+                    }
+                }
+                else
+                    System.Threading.Thread.Sleep(5000000);
                 return 999; 
             }
         }
index 70220481f16e4130ce3dd81de03c4161c39bef4d..6147225389145ce905025a3d4f6d6d7a85760b6c 100644 (file)
@@ -554,7 +554,17 @@ namespace VSCodeTestVariables
         {
             get
             {
-                System.Threading.Thread.Sleep(5000000);
+                // CoreCLR 7.0 have issue with abortable internal native code.
+                // https://github.com/dotnet/runtime/issues/82422
+                if (System.Environment.Version.Major == 7)
+                {
+                    while (true)
+                    {
+                        System.Threading.Thread.Sleep(100);
+                    }
+                }
+                else
+                    System.Threading.Thread.Sleep(5000000);
                 return 999; 
             }
         }