Alerting: Fix flaky test in scheduler's tests (#89923)

This commit is contained in:
Yuri Tseretyan
2024-07-01 13:31:03 -04:00
committed by GitHub
parent fce03cd724
commit 655e477c20

View File

@@ -248,8 +248,8 @@ func (a *alertRule) Run(key ngmodels.AlertRuleKey) error {
evalStart := a.clock.Now()
defer func() {
a.evalApplied(key, ctx.scheduledAt)
evalDuration.Observe(a.clock.Now().Sub(evalStart).Seconds())
a.evalApplied(key, ctx.scheduledAt)
}()
for attempt := int64(1); attempt <= a.maxAttempts; attempt++ {