From: Alexander Köplinger Date: Wed, 19 Feb 2020 13:58:17 +0000 (+0100) Subject: Ensure ActiveIssue attribute is only used with issue links (#32535) X-Git-Tag: submit/tizen/20210909.063632~9631 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=aac8f91cc5510b3d271d86eef616b6007b6e6631;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Ensure ActiveIssue attribute is only used with issue links (#32535) * Ensure ActiveIssue attribute is only used with issue links The constructor that takes an `int` was removed in https://github.com/dotnet/arcade/pull/4831. Update docs to recommend using issue links instead of numbers. Fix two tests that were using ActiveIssue incorrectly. * PR feedback --- diff --git a/docs/pr-guide.md b/docs/pr-guide.md index eb796e7..a46b5a2 100644 --- a/docs/pr-guide.md +++ b/docs/pr-guide.md @@ -38,7 +38,7 @@ In case CI indicates failures which are **highly unlikely** to be caused by chan * An existing issue in the repository should be searched for. Usually the test method's or the test assembly's name (in case of a crash) are good parameters. * If there's an existing issue, a comment should be placed that includes a) the link to the build, b) the affected configuration (ie `netcoreapp-Windows_NT-Release-x64-Windows.81.Amd64.Open`) and c) the Error message and Stack trace. This is necessary as retention policies are in place that recycle _old_ builds. In case the issue is already closed, it should be reopened and labels should be updated to reflect the current failure state. * If there's no existing issue, an issue should be created with the same information outlined above. -* In a follow-up Pull Request, the failing test(s) should be disabled with the corresponding issue number, e.g. `[ActiveIssue(x)]`, and the tracking issue should be labeled as `disabled-test`. +* In a follow-up Pull Request, the failing test(s) should be disabled with the corresponding issue link, e.g. `[ActiveIssue(x)]`, and the tracking issue should be labeled as `disabled-test`. * A comment should be placed in the original Pull Request that links to the created or updated issues. There are plenty of possible bugs, e.g. race conditions, where a failure might highlight a real problem and it won't manifest again on a retry. Therefore these steps should be followed for every iteration of the PR build, e.g. before retrying/rebuilding. diff --git a/docs/workflow/testing/libraries/filtering-tests.md b/docs/workflow/testing/libraries/filtering-tests.md index f7348a0..3b7d911 100644 --- a/docs/workflow/testing/libraries/filtering-tests.md +++ b/docs/workflow/testing/libraries/filtering-tests.md @@ -44,22 +44,22 @@ This attribute returns the 'failing' category, which is disabled by default. **Disable for all platforms and all target frameworks:** ```cs -[ActiveIssue(int issue)] [ActiveIssue(string issue)] ``` **Disable for specific platform:** ```cs -[ActiveIssue(int issue, TestPlatforms platforms)] [ActiveIssue(string issue, TestPlatforms platforms)] ``` +**Disable for specific runtime:** +```cs +[ActiveIssue(string issue, TestRuntimes runtimes)] +``` **Disable for specific target frameworks:** ```cs -[ActiveIssue(int issue, TargetFrameworkMonikers frameworks)] [ActiveIssue(string issue, TargetFrameworkMonikers frameworks)] ``` **Disable for specific test platforms and target frameworks:** ```cs -[ActiveIssue(int issue, TestPlatforms platforms, TargetFrameworkMonikers frameworks)] [ActiveIssue(string issue, TestPlatforms platforms, TargetFrameworkMonikers frameworks)] ``` Use this attribute over test methods to skip failing tests only on the specific platforms and the specific target frameworks. @@ -142,7 +142,7 @@ public class TestClass } ``` -**Note that all of the attributes above must include an issue number/link and/or have a comment next to them briefly justifying the reason. ActiveIssueAttribute and SkipOnTargetFrameworkAttribute should use their constructor parameters to do this** +**Note that all of the attributes above must include an issue link and/or have a comment next to them briefly justifying the reason. ActiveIssueAttribute and SkipOnTargetFrameworkAttribute should use their constructor parameters to do this** _**A few common examples with the above attributes:**_ diff --git a/src/libraries/System.Collections.Immutable/tests/ImmutableSortedSetTest.nonnetstandard.cs b/src/libraries/System.Collections.Immutable/tests/ImmutableSortedSetTest.nonnetstandard.cs index dda5187..ddd8992 100644 --- a/src/libraries/System.Collections.Immutable/tests/ImmutableSortedSetTest.nonnetstandard.cs +++ b/src/libraries/System.Collections.Immutable/tests/ImmutableSortedSetTest.nonnetstandard.cs @@ -14,7 +14,7 @@ namespace System.Collections.Immutable.Tests public partial class ImmutableSortedSetTest : ImmutableSetTest { [Fact] - [ActiveIssue("Sporadic failure, needs a port of https://github.com/dotnet/coreclr/pull/4340", TargetFrameworkMonikers.NetFramework)] + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Sporadic failure, needs a port of https://github.com/dotnet/coreclr/pull/4340")] public void EmptyTest() { this.EmptyTestHelper(Empty(), 5, null); diff --git a/src/libraries/System.Runtime.Serialization.Xml/tests/DataContractSerializer.cs b/src/libraries/System.Runtime.Serialization.Xml/tests/DataContractSerializer.cs index dd43a26..c87c044 100644 --- a/src/libraries/System.Runtime.Serialization.Xml/tests/DataContractSerializer.cs +++ b/src/libraries/System.Runtime.Serialization.Xml/tests/DataContractSerializer.cs @@ -3490,31 +3490,6 @@ public static partial class DataContractSerializerTests TestObjectWithDifferentPayload(valueSampleICollectionTExplicitWithCDCContainsPrivateDC, netcorePayloadSampleICollectionTExplicitWithCDCContainsPrivateDC, desktopPayloadSampleICollectionTExplicitWithCDCContainsPrivateDC, setting); } - /// - /// This case is a part of DCS_BasicPerSerializerRoundTripAndCompare_SampleTypes, but in these scenarios it was not support in current version. - /// - [Fact] - [ActiveIssue("Not support")] - public static void DCS_BasicPerSerializerRoundTripAndCompare_SampleTypes_Notsupport() - { - TestObjectInObjectContainerWithSimpleResolver(new SerializationTestTypes.ArrayListWithCDCFilledWithMixedTypes(true), @"<_data z:Id=""i1"" i:type=""a:SerializationTestTypes.ArrayListWithCDCFilledWithMixedTypes***"" xmlns:z=""http://schemas.microsoft.com/2003/10/Serialization/"" xmlns:a=""http://schemas.datacontract.org/2004/07/SerializationTestTypes.ArrayListWithCDCFilledWithMixedTypes***"">55cb1688-dec7-4106-a6d8-7e57590cb20aNo change<_data/>Data<_data>No changeDataDataData214748364768656C6C6F20776F726C6468656C6C6F20776F726C64No changeNo change0100100<_data2 z:Ref=""i1"" xmlns:z=""http://schemas.microsoft.com/2003/10/Serialization/""/>"); - - TestObjectInObjectContainerWithSimpleResolver(new SerializationTestTypes.CollectionBaseWithCDCFilledWithMixedTypes(true), @"<_data z:Id=""i1"" i:type=""a:SerializationTestTypes.CollectionBaseWithCDCFilledWithMixedTypes***"" xmlns:z=""http://schemas.microsoft.com/2003/10/Serialization/"" xmlns:a=""http://schemas.datacontract.org/2004/07/SerializationTestTypes.CollectionBaseWithCDCFilledWithMixedTypes***"">55cb1688-dec7-4106-a6d8-7e57590cb20aNo change<_data/>Data<_data>No changeDataDataData214748364768656C6C6F20776F726C6468656C6C6F20776F726C64No changeNo change0100100<_data2 z:Ref=""i1"" xmlns:z=""http://schemas.microsoft.com/2003/10/Serialization/""/>"); - - TestObjectInObjectContainerWithSimpleResolver(new SerializationTestTypes.DCHashtableContainerMixedTypes(true), "", skipStringCompare: true); - - TestObjectInObjectContainerWithSimpleResolver(new SerializationTestTypes.IReadWriteXmlWriteBinHex_EqualityDefined(), @"<_data i:type=""a:SerializationTestTypes.IReadWriteXmlWriteBinHex_EqualityDefined***"" xmlns:a=""http://schemas.datacontract.org/2004/07/SerializationTestTypes.IReadWriteXmlWriteBinHex_EqualityDefined***"">68656C6C6F20776F726C64<_data2 i:type=""a:SerializationTestTypes.IReadWriteXmlWriteBinHex_EqualityDefined***"" xmlns:a=""http://schemas.datacontract.org/2004/07/SerializationTestTypes.IReadWriteXmlWriteBinHex_EqualityDefined***"">68656C6C6F20776F726C64"); - - TestObjectInObjectContainerWithSimpleResolver(new SerializationTestTypes.PrivateDefaultCtorIXmlSerializables(true), @"<_data i:type=""a:SerializationTestTypes.PrivateDefaultCtorIXmlSerializables***"" xmlns:a=""http://schemas.datacontract.org/2004/07/SerializationTestTypes.PrivateDefaultCtorIXmlSerializables***"">68656C6C6F20776F726C64<_data2 i:type=""a:SerializationTestTypes.PrivateDefaultCtorIXmlSerializables***"" xmlns:a=""http://schemas.datacontract.org/2004/07/SerializationTestTypes.PrivateDefaultCtorIXmlSerializables***"">68656C6C6F20776F726C64"); - - TestObjectInObjectContainerWithSimpleResolver(new SerializationTestTypes.PublicIXmlSerializablesWithPublicSchemaProvider(), @"<_data i:type=""a:SerializationTestTypes.PublicIXmlSerializablesWithPublicSchemaProvider***"" xmlns:a=""http://schemas.datacontract.org/2004/07/SerializationTestTypes.PublicIXmlSerializablesWithPublicSchemaProvider***"">68656C6C6F20776F726C64<_data2 i:type=""a:SerializationTestTypes.PublicIXmlSerializablesWithPublicSchemaProvider***"" xmlns:a=""http://schemas.datacontract.org/2004/07/SerializationTestTypes.PublicIXmlSerializablesWithPublicSchemaProvider***"">68656C6C6F20776F726C64"); - - TestObjectInObjectContainerWithSimpleResolver(new SerializationTestTypes.PublicExplicitIXmlSerializablesWithPublicSchemaProvider(), @"<_data i:type=""a:SerializationTestTypes.PublicExplicitIXmlSerializablesWithPublicSchemaProvider***"" xmlns:a=""http://schemas.datacontract.org/2004/07/SerializationTestTypes.PublicExplicitIXmlSerializablesWithPublicSchemaProvider***"">68656C6C6F20776F726C64<_data2 i:type=""a:SerializationTestTypes.PublicExplicitIXmlSerializablesWithPublicSchemaProvider***"" xmlns:a=""http://schemas.datacontract.org/2004/07/SerializationTestTypes.PublicExplicitIXmlSerializablesWithPublicSchemaProvider***"">68656C6C6F20776F726C64"); - - TestObjectInObjectContainerWithSimpleResolver(new SerializationTestTypes.PublicIXmlSerializablesWithPrivateSchemaProvider(), @"<_data i:type=""a:SerializationTestTypes.PublicIXmlSerializablesWithPrivateSchemaProvider***"" xmlns:a=""http://schemas.datacontract.org/2004/07/SerializationTestTypes.PublicIXmlSerializablesWithPrivateSchemaProvider***"">68656C6C6F20776F726C64<_data2 i:type=""a:SerializationTestTypes.PublicIXmlSerializablesWithPrivateSchemaProvider***"" xmlns:a=""http://schemas.datacontract.org/2004/07/SerializationTestTypes.PublicIXmlSerializablesWithPrivateSchemaProvider***"">68656C6C6F20776F726C64"); - - } - [Fact] public static void DCS_BasicPerSerializerRoundTripAndCompare_Collections() {