Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions internal/selftelemetry/impl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading