diff --git a/src/libraries/System.Diagnostics.PerformanceCounter/tests/InstanceDataTests.cs b/src/libraries/System.Diagnostics.PerformanceCounter/tests/InstanceDataTests.cs index 7ff34aaafb263..0fe20de04e275 100644 --- a/src/libraries/System.Diagnostics.PerformanceCounter/tests/InstanceDataTests.cs +++ b/src/libraries/System.Diagnostics.PerformanceCounter/tests/InstanceDataTests.cs @@ -124,8 +124,13 @@ public static void InstanceDataCollectionCollection_CopyTo() public static InstanceDataCollectionCollection GetInstanceDataCollectionCollection() { - PerformanceCounterCategory pcc = Helpers.RetryOnAllPlatforms(() => new PerformanceCounterCategory("Processor")); - return Helpers.RetryOnAllPlatforms(() => pcc.ReadCategory()); + PerformanceCounterCategory pcc = Helpers.RetryOnAllPlatforms(() => new PerformanceCounterCategory("Processor")); + return Helpers.RetryOnAllPlatforms(() => + { + var idcc = pcc.ReadCategory(); + Assert.InRange(idcc.Values.Count, 1, int.MaxValue); + return idcc; + }); } public static InstanceDataCollection GetInstanceDataCollection()