Skip to content

Commit

Permalink
Disable couple of randomly failing PerformanceCounter tests (#61101)
Browse files Browse the repository at this point in the history
* Disable couple of randomly failing PerformanceCounter tests

* fix: disabled the wrong test
  • Loading branch information
krwq committed Nov 2, 2021
1 parent 5a078b5 commit 02b9e72
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ public static void PerformanceCounterCategory_GetCounterHelp_Invalid()
}

[ConditionalFact(typeof(Helpers), nameof(Helpers.IsElevatedAndCanWriteAndReadNetPerfCounters))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/60933", typeof(PlatformDetection), nameof(PlatformDetection.IsWindows), nameof(PlatformDetection.Is64BitProcess))]
public static void PerformanceCounterCategory_CategoryType_MultiInstance()
{
string categoryName = nameof(PerformanceCounterCategory_CategoryType_MultiInstance) + "_Category";
Expand Down Expand Up @@ -266,6 +267,7 @@ public static void PerformanceCounterCategory_InstanceExists_Invalid()
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/60933", typeof(PlatformDetection), nameof(PlatformDetection.IsWindows), nameof(PlatformDetection.Is64BitProcess))]
public static void PerformanceCounterCategory_InstanceExists_Static()
{
PerformanceCounterCategory pcc = Helpers.RetryOnAllPlatforms(() => new PerformanceCounterCategory("Processor"));
Expand All @@ -289,6 +291,7 @@ public static void PerformanceCounterCategory_InstanceExists_StaticInvalid()
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/60933", typeof(PlatformDetection), nameof(PlatformDetection.IsWindows), nameof(PlatformDetection.Is64BitProcess))]
public static void PerformanceCounterCategory_ReadCategory()
{
PerformanceCounterCategory pcc = Helpers.RetryOnAllPlatforms(() => new PerformanceCounterCategory("Processor"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public static void PerformanceCounter_CreateCounter_Count0()
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/60933", typeof(PlatformDetection), nameof(PlatformDetection.IsWindows), nameof(PlatformDetection.Is64BitProcess))]
public static void PerformanceCounter_CreateCounter_ProcessorCounter()
{
using (PerformanceCounter counterSample = new PerformanceCounter("Processor", "Interrupts/sec", "0", "."))
Expand Down Expand Up @@ -187,6 +188,7 @@ public static void PerformanceCounter_BeginInit_ProcessorCounter()
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/60933", typeof(PlatformDetection), nameof(PlatformDetection.IsWindows), nameof(PlatformDetection.Is64BitProcess))]
public static void PerformanceCounter_BeginInitEndInit_ProcessorCounter()
{
using (PerformanceCounter counterSample = new PerformanceCounter("Processor", "Interrupts/sec", "0", "."))
Expand Down Expand Up @@ -268,6 +270,7 @@ public static void PerformanceCounter_Increment_IncrementReadOnly()
}

[ConditionalFact(typeof(Helpers), nameof(Helpers.IsElevatedAndCanWriteAndReadNetPerfCounters))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/60933", typeof(PlatformDetection), nameof(PlatformDetection.IsWindows), nameof(PlatformDetection.Is64BitProcess))]
public static void PerformanceCounter_Decrement_DecrementReadOnly()
{
string categoryName = nameof(PerformanceCounter_Decrement_DecrementReadOnly) + "_Category";
Expand Down

0 comments on commit 02b9e72

Please sign in to comment.