WASM Re-enable Threading.Channels serialization tests (#39016)
authorSantiago Fernandez Madero <safern@microsoft.com>
Fri, 10 Jul 2020 05:57:22 +0000 (22:57 -0700)
committerGitHub <noreply@github.com>
Fri, 10 Jul 2020 05:57:22 +0000 (22:57 -0700)
* WASM Re-enable Threading.Channels serialization tests

* PR Feedback

* Use ConditionalFact

src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs
src/libraries/System.Threading.Channels/tests/ChannelClosedExceptionTests.netcoreapp.cs

index e4b7ec9..a96c217 100644 (file)
@@ -42,6 +42,8 @@ namespace System
         public static bool IsNotWindows => !IsWindows;
 
         public static bool IsThreadingSupported => !IsBrowser;
+        public static bool IsBinaryFormatterSupported => !IsBrowser;
+
         // Please make sure that you have the libgdiplus dependency installed.
         // For details, see https://docs.microsoft.com/dotnet/core/install/dependencies?pivots=os-macos&tabs=netcore31#libgdiplus
         public static bool IsDrawingSupported
index 0fde76e..70eca33 100644 (file)
@@ -9,8 +9,7 @@ namespace System.Threading.Channels.Tests
 {
     public partial class ChannelClosedExceptionTests
     {
-        [Fact]
-        [ActiveIssue("https://github.com/dotnet/runtime/issues/37648", TestPlatforms.Browser)]
+        [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsBinaryFormatterSupported))]
         public void Serialization_Roundtrip()
         {
             var s = new MemoryStream();