Skip to content

Commit

Permalink
Address JSON test failures on Mono + Windows (#42960)
Browse files Browse the repository at this point in the history
  • Loading branch information
layomia committed Oct 2, 2020
1 parent 0403018 commit 43a03ce
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ private static IEnumerable<bool> 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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -385,6 +390,7 @@ public override void Write(Utf8JsonWriter writer, Outer<T> 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))))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,8 @@ public static IEnumerable<object[]> DataForInvalidJsonForTypeTests()
yield return new object[] { typeof(Dictionary<string, Dictionary<string, Poco>>), @"{""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
Expand Down

0 comments on commit 43a03ce

Please sign in to comment.