mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
alerting: add lock on job to prevent a race condition (#18218)
without this lock there is a race condition between the scheduler and job processing.
This commit is contained in:
@@ -22,7 +22,7 @@ func TestEngineTimeouts(t *testing.T) {
|
||||
setting.AlertingNotificationTimeout = 30 * time.Second
|
||||
setting.AlertingMaxAttempts = 3
|
||||
engine.resultHandler = &FakeResultHandler{}
|
||||
job := &Job{Running: true, Rule: &Rule{}}
|
||||
job := &Job{running: true, Rule: &Rule{}}
|
||||
|
||||
Convey("Should trigger as many retries as needed", func() {
|
||||
Convey("pended alert for datasource -> result handler should be worked", func() {
|
||||
|
||||
Reference in New Issue
Block a user