From b02bc51a1ae070df0ea8d8197bf15edb36269d2d Mon Sep 17 00:00:00 2001 From: Tarek Mahmoud Sayed Date: Wed, 23 Apr 2025 09:18:55 -0700 Subject: [PATCH] Remove unreliable check in Rate Limiting test --- .../tests/DiagnosticSourceEventSourceBridgeTests.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/tests/DiagnosticSourceEventSourceBridgeTests.cs b/src/libraries/System.Diagnostics.DiagnosticSource/tests/DiagnosticSourceEventSourceBridgeTests.cs index cc4062169dd77a..547338de052061 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/tests/DiagnosticSourceEventSourceBridgeTests.cs +++ b/src/libraries/System.Diagnostics.DiagnosticSource/tests/DiagnosticSourceEventSourceBridgeTests.cs @@ -1477,9 +1477,6 @@ public void TestRateLimitingSampler(int maxOperationPerSecond) // tolerance of extra sample can be done if the second turn after the loop check sw.ElapsedMilliseconds. 2 extra events (start and stop). Assert.True(maxOps * 2 * 3 + 2 >= eventSourceListener.EventCount, $"{eventSourceListener.EventCount} events were recorded, while maxOpPerSecond is {maxOpPerSecond}"); - // Ensure the minimum number of events is recorded in 3 seconds. We are choosing reasonable small number as it depends on the machine speed. - Assert.True(eventSourceListener.EventCount >= 6, $"{eventSourceListener.EventCount} events were recorded, while maxOpPerSecond is {maxOpPerSecond}"); - Thread.Sleep(1000); // ensure new allowance for root creation Activity.Current = null; using var root = a.Source.StartActivity("root");