From e37b7ef6e35f557cee2cccccac8f74d069382cef Mon Sep 17 00:00:00 2001 From: Santiago Fernandez Madero Date: Thu, 9 Jul 2020 13:03:39 -0700 Subject: [PATCH 1/3] WASM Re-enable Threading.Channels serialization tests --- .../tests/ChannelClosedExceptionTests.netcoreapp.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/libraries/System.Threading.Channels/tests/ChannelClosedExceptionTests.netcoreapp.cs b/src/libraries/System.Threading.Channels/tests/ChannelClosedExceptionTests.netcoreapp.cs index 0fde76e9cb1fa7..07cd13281b17ca 100644 --- a/src/libraries/System.Threading.Channels/tests/ChannelClosedExceptionTests.netcoreapp.cs +++ b/src/libraries/System.Threading.Channels/tests/ChannelClosedExceptionTests.netcoreapp.cs @@ -10,7 +10,6 @@ namespace System.Threading.Channels.Tests public partial class ChannelClosedExceptionTests { [Fact] - [ActiveIssue("https://github.com/dotnet/runtime/issues/37648", TestPlatforms.Browser)] public void Serialization_Roundtrip() { var s = new MemoryStream(); From 98927694b8895c8fc0b5605842f6fa7c45fe8e55 Mon Sep 17 00:00:00 2001 From: Santiago Fernandez Madero Date: Thu, 9 Jul 2020 14:24:36 -0700 Subject: [PATCH 2/3] PR Feedback --- .../tests/ChannelClosedExceptionTests.netcoreapp.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libraries/System.Threading.Channels/tests/ChannelClosedExceptionTests.netcoreapp.cs b/src/libraries/System.Threading.Channels/tests/ChannelClosedExceptionTests.netcoreapp.cs index 07cd13281b17ca..893f5f79aa6409 100644 --- a/src/libraries/System.Threading.Channels/tests/ChannelClosedExceptionTests.netcoreapp.cs +++ b/src/libraries/System.Threading.Channels/tests/ChannelClosedExceptionTests.netcoreapp.cs @@ -10,6 +10,7 @@ namespace System.Threading.Channels.Tests public partial class ChannelClosedExceptionTests { [Fact] + [PlatformSpecific(~TestPlatforms.Browser)] // BinaryFormatter not supported in wasm public void Serialization_Roundtrip() { var s = new MemoryStream(); From a02621d452c5eca6ded868bcac3f06ae0077e348 Mon Sep 17 00:00:00 2001 From: Santiago Fernandez Madero Date: Thu, 9 Jul 2020 16:42:33 -0700 Subject: [PATCH 3/3] Use ConditionalFact --- .../Common/tests/TestUtilities/System/PlatformDetection.cs | 2 ++ .../tests/ChannelClosedExceptionTests.netcoreapp.cs | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs index e4b7ec92f3294a..a96c217711c5c6 100644 --- a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs +++ b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs @@ -42,6 +42,8 @@ public static partial class PlatformDetection 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 diff --git a/src/libraries/System.Threading.Channels/tests/ChannelClosedExceptionTests.netcoreapp.cs b/src/libraries/System.Threading.Channels/tests/ChannelClosedExceptionTests.netcoreapp.cs index 893f5f79aa6409..70eca333658665 100644 --- a/src/libraries/System.Threading.Channels/tests/ChannelClosedExceptionTests.netcoreapp.cs +++ b/src/libraries/System.Threading.Channels/tests/ChannelClosedExceptionTests.netcoreapp.cs @@ -9,8 +9,7 @@ namespace System.Threading.Channels.Tests { public partial class ChannelClosedExceptionTests { - [Fact] - [PlatformSpecific(~TestPlatforms.Browser)] // BinaryFormatter not supported in wasm + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsBinaryFormatterSupported))] public void Serialization_Roundtrip() { var s = new MemoryStream();