From ae908daf18fd6e79aac55ed2f1732ed0e1731d87 Mon Sep 17 00:00:00 2001 From: Santiago Fernandez Madero Date: Fri, 8 May 2020 11:56:13 -0700 Subject: [PATCH 1/3] Disable System.Diagnostics.Tests.EventLogSourceCreationTests.CheckSourceExistenceAndDeletion --- .../tests/EventLogTests/EventLogSourceCreationTests.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libraries/System.Diagnostics.EventLog/tests/EventLogTests/EventLogSourceCreationTests.cs b/src/libraries/System.Diagnostics.EventLog/tests/EventLogTests/EventLogSourceCreationTests.cs index 29bfba9dcbe8b4..1e5f1d632e3b9e 100644 --- a/src/libraries/System.Diagnostics.EventLog/tests/EventLogTests/EventLogSourceCreationTests.cs +++ b/src/libraries/System.Diagnostics.EventLog/tests/EventLogTests/EventLogSourceCreationTests.cs @@ -11,6 +11,7 @@ public class EventLogSourceCreationTests { [Trait(XunitConstants.Category, "EventLog")] // Unreliable Win32 API call [ConditionalFact(typeof(Helpers), nameof(Helpers.IsElevatedAndSupportsEventLogs))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/36135", TestPlatforms.Windows)] public void CheckSourceExistenceAndDeletion() { string source = "Source_" + nameof(EventLogSourceCreationTests); From cb5eb3521e2e045bac50d0e17ab34d1fe65aa9ff Mon Sep 17 00:00:00 2001 From: Santiago Fernandez Madero Date: Fri, 8 May 2020 12:17:47 -0700 Subject: [PATCH 2/3] Fix trait to skip tests in CI --- .../tests/EventLogTests/EventLogSourceCreationTests.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/libraries/System.Diagnostics.EventLog/tests/EventLogTests/EventLogSourceCreationTests.cs b/src/libraries/System.Diagnostics.EventLog/tests/EventLogTests/EventLogSourceCreationTests.cs index 1e5f1d632e3b9e..eb83b4b376d39a 100644 --- a/src/libraries/System.Diagnostics.EventLog/tests/EventLogTests/EventLogSourceCreationTests.cs +++ b/src/libraries/System.Diagnostics.EventLog/tests/EventLogTests/EventLogSourceCreationTests.cs @@ -9,9 +9,8 @@ namespace System.Diagnostics.Tests { public class EventLogSourceCreationTests { - [Trait(XunitConstants.Category, "EventLog")] // Unreliable Win32 API call + [Trait(XunitConstants.Category, XunitConstants.IgnoreForCI)] // Unreliable Win32 API call [ConditionalFact(typeof(Helpers), nameof(Helpers.IsElevatedAndSupportsEventLogs))] - [ActiveIssue("https://github.com/dotnet/runtime/issues/36135", TestPlatforms.Windows)] public void CheckSourceExistenceAndDeletion() { string source = "Source_" + nameof(EventLogSourceCreationTests); @@ -30,7 +29,7 @@ public void CheckSourceExistenceAndDeletion() Assert.False(EventLog.SourceExists(source)); } - [Trait(XunitConstants.Category, "EventLog")] // Unreliable Win32 API call + [Trait(XunitConstants.Category, XunitConstants.IgnoreForCI)] // Unreliable Win32 API call [ConditionalFact(typeof(Helpers), nameof(Helpers.IsElevatedAndSupportsEventLogs))] [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void LogNameWithSame8FirstChars_NetCore() @@ -57,7 +56,7 @@ public void LogNameWithSame8FirstChars_NetCore() } } - [Trait(XunitConstants.Category, "EventLog")] // Unreliable Win32 API call + [Trait(XunitConstants.Category, XunitConstants.IgnoreForCI)] // Unreliable Win32 API call [ConditionalFact(typeof(Helpers), nameof(Helpers.IsElevatedAndSupportsEventLogs))] [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] public void LogNameWithSame8FirstChars_NetFramework() @@ -146,7 +145,7 @@ public void SourceDataNull() Assert.Throws(() => EventLog.CreateEventSource(null)); } - [Trait(XunitConstants.Category, "EventLog")] // Unreliable Win32 API call + [Trait(XunitConstants.Category, XunitConstants.IgnoreForCI)] // Unreliable Win32 API call [ConditionalFact(typeof(Helpers), nameof(Helpers.IsElevatedAndSupportsEventLogs))] public void SourceAlreadyExistsWhenCreatingSource() { From d6a5f1703a76f0a55e964301170079b228925980 Mon Sep 17 00:00:00 2001 From: Santiago Fernandez Madero Date: Wed, 13 May 2020 10:35:24 -0700 Subject: [PATCH 3/3] Use ActiveIssue instead --- .../tests/EventLogTests/EventLogSourceCreationTests.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libraries/System.Diagnostics.EventLog/tests/EventLogTests/EventLogSourceCreationTests.cs b/src/libraries/System.Diagnostics.EventLog/tests/EventLogTests/EventLogSourceCreationTests.cs index eb83b4b376d39a..fc2e0f33ce959d 100644 --- a/src/libraries/System.Diagnostics.EventLog/tests/EventLogTests/EventLogSourceCreationTests.cs +++ b/src/libraries/System.Diagnostics.EventLog/tests/EventLogTests/EventLogSourceCreationTests.cs @@ -9,7 +9,7 @@ namespace System.Diagnostics.Tests { public class EventLogSourceCreationTests { - [Trait(XunitConstants.Category, XunitConstants.IgnoreForCI)] // Unreliable Win32 API call + [ActiveIssue("https://github.com/dotnet/runtime/issues/36135")] [ConditionalFact(typeof(Helpers), nameof(Helpers.IsElevatedAndSupportsEventLogs))] public void CheckSourceExistenceAndDeletion() { @@ -29,7 +29,7 @@ public void CheckSourceExistenceAndDeletion() Assert.False(EventLog.SourceExists(source)); } - [Trait(XunitConstants.Category, XunitConstants.IgnoreForCI)] // Unreliable Win32 API call + [ActiveIssue("https://github.com/dotnet/runtime/issues/36135")] [ConditionalFact(typeof(Helpers), nameof(Helpers.IsElevatedAndSupportsEventLogs))] [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void LogNameWithSame8FirstChars_NetCore() @@ -56,7 +56,7 @@ public void LogNameWithSame8FirstChars_NetCore() } } - [Trait(XunitConstants.Category, XunitConstants.IgnoreForCI)] // Unreliable Win32 API call + [ActiveIssue("https://github.com/dotnet/runtime/issues/36135")] [ConditionalFact(typeof(Helpers), nameof(Helpers.IsElevatedAndSupportsEventLogs))] [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] public void LogNameWithSame8FirstChars_NetFramework() @@ -145,7 +145,7 @@ public void SourceDataNull() Assert.Throws(() => EventLog.CreateEventSource(null)); } - [Trait(XunitConstants.Category, XunitConstants.IgnoreForCI)] // Unreliable Win32 API call + [ActiveIssue("https://github.com/dotnet/runtime/issues/36135")] [ConditionalFact(typeof(Helpers), nameof(Helpers.IsElevatedAndSupportsEventLogs))] public void SourceAlreadyExistsWhenCreatingSource() {