Skip to content

Commit 718c776

Browse files
Serialization reenable tests (#118507)
* Turn 'em on - lets see what is still a problem. * Remove commented 'ActiveIssues' for tests that are confirmed passing now. * Re-disable one WASM test that still fails. * Cleanup more commented [ActiveIssue] attributes. * Disable on wasm * Fix platform detection for skipping test. * Remove commented [ActiveIssue] attributes.
1 parent 549abf4 commit 718c776

File tree

8 files changed

+11
-43
lines changed

8 files changed

+11
-43
lines changed

src/libraries/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.RuntimeOnly.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3196,7 +3196,6 @@ public static void XmlMembersMapping_Soap_MultipleMembers_IsReturnValue()
31963196
}
31973197

31983198
[Fact]
3199-
[ActiveIssue("https://github.com/dotnet/runtime/issues/1395")]
32003199
public static void Xml_TypeWithReadOnlyMyCollectionProperty()
32013200
{
32023201
var value = new TypeWithReadOnlyMyCollectionProperty();
@@ -3366,7 +3365,6 @@ public static void Xml_NookTypes()
33663365
}
33673366

33683367
[Fact]
3369-
[ActiveIssue("https://github.com/dotnet/runtime/issues/60462", TestPlatforms.iOS | TestPlatforms.tvOS)]
33703368
public static void DerivedTypeWithDifferentOverrides()
33713369
{
33723370
DerivedTypeWithDifferentOverrides value = new DerivedTypeWithDifferentOverrides() { Name1 = "Name1", Name2 = "Name2", Name3 = "Name3", Name4 = "Name4", Name5 = "Name5" };
@@ -3379,7 +3377,6 @@ public static void DerivedTypeWithDifferentOverrides()
33793377
}
33803378

33813379
[Fact]
3382-
[ActiveIssue("https://github.com/dotnet/runtime/issues/60462", TestPlatforms.iOS | TestPlatforms.tvOS)]
33833380
public static void DerivedTypeWithDifferentOverrides2()
33843381
{
33853382
DerivedTypeWithDifferentOverrides2 value = new DerivedTypeWithDifferentOverrides2() { Name1 = "Name1", Name2 = "Name2", Name3 = "Name3", Name4 = "Name4", Name5 = "Name5", Name6 = "Name6", Name7 = "Name7" };

src/libraries/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,6 @@ public static void Xml_ListRoot()
265265
// horizon that it's not worth the trouble.
266266
#if !XMLSERIALIZERGENERATORTESTS
267267
[Fact]
268-
[ActiveIssue("https://github.com/dotnet/runtime/issues/74247", TestPlatforms.tvOS)]
269268
public static void Xml_ReadOnlyCollection()
270269
{
271270
ReadOnlyCollection<string> roc = new ReadOnlyCollection<string>(new string[] { "one", "two" });
@@ -287,7 +286,6 @@ public static void Xml_ReadOnlyCollection()
287286

288287
[Theory]
289288
[MemberData(nameof(Xml_ImmutableCollections_MemberData))]
290-
[ActiveIssue("https://github.com/dotnet/runtime/issues/74247", TestPlatforms.tvOS)]
291289
public static void Xml_ImmutableCollections(Type type, object collection, Type createException, Type addException, string expectedXml, string exMsg = null)
292290
{
293291
XmlSerializer serializer;
@@ -2309,8 +2307,7 @@ public static void Xml_TypeWithSpecialCharacterInStringMember()
23092307
// loaded in the default ALC, which causes problems for this test.
23102308
[SkipOnPlatform(TestPlatforms.Browser, "AssemblyDependencyResolver not supported in wasm")]
23112309
#endif
2312-
[ActiveIssue("34072", TestRuntimes.Mono)]
2313-
[ActiveIssue("https://github.com/dotnet/runtime/issues/96799", typeof(PlatformDetection), nameof(PlatformDetection.IsReadyToRunCompiled))]
2310+
[ActiveIssue("https://github.com/dotnet/runtime/issues/34072", TestRuntimes.Mono)]
23142311
public static void Xml_TypeInCollectibleALC()
23152312
{
23162313
ExecuteAndUnload("SerializableAssembly.dll", "SerializationTypes.SimpleType", out var weakRef);

src/libraries/System.Runtime.Serialization.Schema/tests/System/Runtime/Serialization/Schema/RoundTripTest.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ public RoundTripTest(ITestOutputHelper output)
2222
}
2323

2424
[Fact]
25-
[ActiveIssue("https://github.com/dotnet/runtime/issues/73961", typeof(PlatformDetection), nameof(PlatformDetection.IsBuiltWithAggressiveTrimming), nameof(PlatformDetection.IsBrowser))]
26-
[ActiveIssue("https://github.com/dotnet/runtime/issues/73961", typeof(PlatformDetection), nameof(PlatformDetection.IsMonoRuntime), nameof(PlatformDetection.IsBuiltWithAggressiveTrimming), nameof(PlatformDetection.IsAppleMobile))]
25+
// Passes on some wasm, but not all? Seems to have both passed and failed on the same browser/wasm/OS/Mono-CoreCLR combo in the same pipeline? How does that happen? Is this trimming related?
26+
[ActiveIssue("https://github.com/dotnet/runtime/issues/73961", typeof(PlatformDetection), nameof(PlatformDetection.IsBuiltWithAggressiveTrimming))]
2727
public void RountTripTest()
2828
{
2929
// AppContext SetSwitch seems to be unreliable in the unit test case. So let's not rely on it
@@ -81,7 +81,6 @@ public void RountTripTest()
8181
}
8282

8383
[Fact]
84-
[ActiveIssue("https://github.com/dotnet/runtime/issues/73961", typeof(PlatformDetection), nameof(PlatformDetection.IsBuiltWithAggressiveTrimming), nameof(PlatformDetection.IsBrowser))]
8584
public void RoundTripXmlSerializableWithSpecialAttributesTest()
8685
{
8786
XsdDataContractExporter exporter = new XsdDataContractExporter();

src/libraries/System.Runtime.Serialization.Xml/tests/DataContractSerializer.cs

Lines changed: 6 additions & 26 deletions
Large diffs are not rendered by default.

src/libraries/System.Runtime.Serialization.Xml/tests/DataContractSerializerStressTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
public static partial class DataContractSerializerTests
1111
{
1212
[Fact]
13-
[ActiveIssue("https://github.com/dotnet/runtime/issues/34962", TestRuntimes.Mono)]
1413
public static void DCS_MyPersonSurrogate_Stress()
1514
{
1615
// This test is to verify a bug fix made in ObjectToIdCache.cs.

src/libraries/System.Runtime.Serialization.Xml/tests/XmlDictionaryWriterTest.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,6 @@ void AssertBytesWritten(Action<XmlDictionaryWriter> action, XmlBinaryNodeType no
495495
}
496496

497497
[Fact]
498-
[ActiveIssue("https://github.com/dotnet/runtime/issues/85013", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsMonoAOT))]
499498
public static void XmlBaseWriter_WriteString()
500499
{
501500
const byte Chars8Text = 152;

src/libraries/System.Runtime.Serialization.Xml/tests/XsdDataContractExporterTests/ExporterApiTests.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,7 @@ public static IEnumerable<object[]> CanExport_MemberData()
8787
}
8888

8989
[Theory]
90-
[ActiveIssue("https://github.com/dotnet/runtime/issues/73961", typeof(PlatformDetection), nameof(PlatformDetection.IsBuiltWithAggressiveTrimming), nameof(PlatformDetection.IsBrowser))]
91-
[ActiveIssue("https://github.com/dotnet/runtime/issues/73961", typeof(PlatformDetection), nameof(PlatformDetection.IsWasi))]
92-
[ActiveIssue("https://github.com/dotnet/runtime/issues/73961", typeof(PlatformDetection), nameof(PlatformDetection.IsMonoRuntime), nameof(PlatformDetection.IsBuiltWithAggressiveTrimming), nameof(PlatformDetection.IsAppleMobile))]
90+
[ActiveIssue("https://github.com/dotnet/runtime/issues/73961", typeof(PlatformDetection), nameof(PlatformDetection.IsBuiltWithAggressiveTrimming))]
9391
[MemberData(nameof(Export_MemberData))]
9492
public void Export(string testname, Action<XsdDataContractExporter> export, Action<string, XmlSchemaSet> schemaCheck = null)
9593
{

src/libraries/System.Runtime.Serialization.Xml/tests/XsdDataContractExporterTests/ExporterTypesTests.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,7 @@ public static IEnumerable<object[]> GetDynamicallyVersionedTypesTestNegativeData
8080
}
8181

8282
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.DataSetXmlSerializationIsSupported))]
83-
[SkipOnPlatform(TestPlatforms.Browser, "Inconsistent and unpredictable results.")] // TODO - Why does 'TypeWithReadWriteCollectionAndNoCtorOnCollection' only cause an exception sometimes, but not all the time? What's special about wasm here?
84-
[ActiveIssue("https://github.com/dotnet/runtime/issues/82967", TestPlatforms.Wasi)]
83+
[ActiveIssue("https://github.com/dotnet/runtime/issues/82967", TestPlatforms.Browser | TestPlatforms.Wasi)]
8584
[InlineData(typeof(NoDataContractWithoutParameterlessConstructor), typeof(InvalidDataContractException), @"Type 'System.Runtime.Serialization.Xml.XsdDataContractExporterTests.ExporterTypesTests+NoDataContractWithoutParameterlessConstructor' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute. Alternatively, you can ensure that the type is public and has a parameterless constructor - all public members of the type will then be serialized, and no attributes will be required.")]
8685
[InlineData(typeof(DataContractWithInvalidMember), typeof(InvalidDataContractException), @"Type 'System.Runtime.Serialization.Xml.XsdDataContractExporterTests.ExporterTypesTests+NoDataContractWithoutParameterlessConstructor' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute. Alternatively, you can ensure that the type is public and has a parameterless constructor - all public members of the type will then be serialized, and no attributes will be required.")]
8786
[InlineData(typeof(SerializableWithInvalidMember), typeof(InvalidDataContractException), @"Type 'System.Runtime.Serialization.Xml.XsdDataContractExporterTests.ExporterTypesTests+NoDataContractWithoutParameterlessConstructor' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute. Alternatively, you can ensure that the type is public and has a parameterless constructor - all public members of the type will then be serialized, and no attributes will be required.")]

0 commit comments

Comments
 (0)