diff --git a/internal/selftelemetry/impl_test.go b/internal/selftelemetry/impl_test.go index e9f652f2..f6b600f8 100644 --- a/internal/selftelemetry/impl_test.go +++ b/internal/selftelemetry/impl_test.go @@ -128,9 +128,14 @@ func TestReceiver_SetDegraded(t *testing.T) { body := scrape(t, url) require.Contains(t, body, "tracecore_receiver_degraded_seconds_total") - // Value must be >0 (>= ~0.05s). + // Value must be >0. The intent is "advanced past zero"; the + // fractional part must contain at least one non-zero digit. No + // upper bound — CI runners under contention can extend the + // observed window well past 50ms (a slow runner saw 0.126s on + // PR #76's rerun and failed against the prior `0\.0[0-9]+` + // upper-bound shape). require.Regexp(t, - `tracecore_receiver_degraded_seconds_total\{[^}]*component_id="clockreceiver/TestReceiver_SetDegraded"[^}]*\}\s+0\.0[0-9]+`, + `tracecore_receiver_degraded_seconds_total\{[^}]*component_id="clockreceiver/TestReceiver_SetDegraded"[^}]*\}\s+\d+\.[0-9]*[1-9]`, body, "degraded counter advanced past 0") recv.SetDegraded(false)