From 37e19adf4fec8d3664389c9a4763ae88904697b2 Mon Sep 17 00:00:00 2001 From: Layomi Akinrinade Date: Thu, 1 Oct 2020 11:02:28 -0700 Subject: [PATCH] Address JSON test failures on Mono + Windows --- .../tests/Serialization/ContinuationTests.cs | 6 ++++++ .../tests/Serialization/EnumConverterTests.cs | 1 + .../tests/Serialization/InvalidJsonTests.cs | 3 ++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/libraries/System.Text.Json/tests/Serialization/ContinuationTests.cs b/src/libraries/System.Text.Json/tests/Serialization/ContinuationTests.cs index e796822362eef..e3b9b699e318b 100644 --- a/src/libraries/System.Text.Json/tests/Serialization/ContinuationTests.cs +++ b/src/libraries/System.Text.Json/tests/Serialization/ContinuationTests.cs @@ -30,6 +30,7 @@ private static IEnumerable IgnoreNullValues [Theory] [MemberData(nameof(TestData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42677", platforms: TestPlatforms.Windows, runtimes: TestRuntimes.Mono)] public static async Task ContinuationShouldWorkAtAnyPosition_Class_Class(int paddingLength, bool ignoreNullValues) { var stream = new MemoryStream(); @@ -86,6 +87,7 @@ public static async Task ContinuationShouldWorkAtAnyPosition_Class_Class(int pad [Theory] [MemberData(nameof(TestData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42677", platforms: TestPlatforms.Windows, runtimes: TestRuntimes.Mono)] public static async Task ContinuationShouldWorkAtAnyPosition_Class_ValueType(int paddingLength, bool ignoreNullValues) { var stream = new MemoryStream(); @@ -141,6 +143,7 @@ public static async Task ContinuationShouldWorkAtAnyPosition_Class_ValueType(int [Theory] [MemberData(nameof(TestData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42677", platforms: TestPlatforms.Windows, runtimes: TestRuntimes.Mono)] public static async Task ContinuationShouldWorkAtAnyPosition_ValueType_Class(int paddingLength, bool ignoreNullValues) { var stream = new MemoryStream(); @@ -197,6 +200,7 @@ public static async Task ContinuationShouldWorkAtAnyPosition_ValueType_Class(int [Theory] [MemberData(nameof(TestData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42677", platforms: TestPlatforms.Windows, runtimes: TestRuntimes.Mono)] public static async Task ContinuationShouldWorkAtAnyPosition_ValueType_ValueType(int paddingLength, bool ignoreNullValues) { var stream = new MemoryStream(); @@ -252,6 +256,7 @@ public static async Task ContinuationShouldWorkAtAnyPosition_ValueType_ValueType [Theory] [MemberData(nameof(TestData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42677", platforms: TestPlatforms.Windows, runtimes: TestRuntimes.Mono)] public static async Task ContinuationShouldWorkAtAnyPosition_ClassWithParamCtor_Class(int paddingLength, bool ignoreNullValues) { var stream = new MemoryStream(); @@ -385,6 +390,7 @@ public override void Write(Utf8JsonWriter writer, Outer value, JsonSerializer [Theory] [InlineData("CustomerSearchApi108KB")] [InlineData("CustomerSearchApi107KB")] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42677", platforms: TestPlatforms.Windows, runtimes: TestRuntimes.Mono)] public static async Task ContinuationAtNullToken(string resourceName) { using (Stream stream = new MemoryStream(Encoding.UTF8.GetBytes(SR.GetResourceString(resourceName)))) diff --git a/src/libraries/System.Text.Json/tests/Serialization/EnumConverterTests.cs b/src/libraries/System.Text.Json/tests/Serialization/EnumConverterTests.cs index 63768b00c37b4..fd8d0b850acd3 100644 --- a/src/libraries/System.Text.Json/tests/Serialization/EnumConverterTests.cs +++ b/src/libraries/System.Text.Json/tests/Serialization/EnumConverterTests.cs @@ -314,6 +314,7 @@ public enum MyEnum } [Fact, OuterLoop] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42677", platforms: TestPlatforms.Windows, runtimes: TestRuntimes.Mono)] public static void VeryLargeAmountOfEnumDictionaryKeysToSerialize() { // Ensure we don't throw OutOfMemoryException. diff --git a/src/libraries/System.Text.Json/tests/Serialization/InvalidJsonTests.cs b/src/libraries/System.Text.Json/tests/Serialization/InvalidJsonTests.cs index 71092e98b8dfd..47a0d9d4d50c0 100644 --- a/src/libraries/System.Text.Json/tests/Serialization/InvalidJsonTests.cs +++ b/src/libraries/System.Text.Json/tests/Serialization/InvalidJsonTests.cs @@ -315,7 +315,8 @@ public static IEnumerable DataForInvalidJsonForTypeTests() yield return new object[] { typeof(Dictionary>), @"{""key"":1}" }; } - [Fact] + [Fact, OuterLoop] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42677", platforms: TestPlatforms.Windows, runtimes: TestRuntimes.Mono)] public static void InvalidJsonForTypeShouldFail() { foreach (object[] args in DataForInvalidJsonForTypeTests()) // ~140K tests, too many for theory to handle well with our infrastructure