Disable tests which require precise GC on mono (#35560)
authorVlad Brezae <brezaevlad@gmail.com>
Tue, 28 Apr 2020 11:09:52 +0000 (14:09 +0300)
committerGitHub <noreply@github.com>
Tue, 28 Apr 2020 11:09:52 +0000 (14:09 +0300)
While these didn't seem to fail with jit, they do fail with interpreter.

src/libraries/System.IO.FileSystem/tests/FileStream/Dispose.cs
src/libraries/System.Threading/tests/ThreadLocalTests.cs

index 74d8e8f..55eaece 100644 (file)
@@ -111,7 +111,7 @@ namespace System.IO.Tests
             }).Dispose();
         }
 
-        [Fact]
+        [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsPreciseGcSupported))]
         public void NoDispose_CallsVirtualDisposeFalseArg_ThrowsDuringFlushWriteBuffer_FinalizerWontThrow()
         {
             RemoteExecutor.Invoke(() =>
@@ -185,7 +185,7 @@ namespace System.IO.Tests
             Assert.False(disposeInvoked, "Expected finalizer to have been suppressed");
         }
 
-        [Fact]
+        [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsPreciseGcSupported))]
         public void Finalizer_CallsVirtualDispose_FalseArg()
         {
             bool disposeInvoked = false;
index 58b56ae..70a4a54 100644 (file)
@@ -217,7 +217,7 @@ namespace System.Threading.Tests
             }
         }
 
-        [Fact]
+        [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsPreciseGcSupported))]
         public static void RunThreadLocalTest7_WeakReference()
         {
             var threadLocalWeakReferenceTest = new ThreadLocalWeakReferenceTest();