mirror of https://github.com/prometheus/prometheus
Merge pull request #1348 from prometheus/notifytestfix
Increase notification test timeoutspull/1354/head
commit
2e29573770
|
@ -274,7 +274,6 @@ func (n *Handler) send(alerts ...*model.Alert) error {
|
||||||
func (n *Handler) Stop() {
|
func (n *Handler) Stop() {
|
||||||
log.Info("Stopping notification handler...")
|
log.Info("Stopping notification handler...")
|
||||||
|
|
||||||
close(n.more)
|
|
||||||
n.cancel()
|
n.cancel()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -192,7 +192,7 @@ func TestHandlerFull(t *testing.T) {
|
||||||
case <-called:
|
case <-called:
|
||||||
expected = alerts[i*maxBatchSize : (i+1)*maxBatchSize]
|
expected = alerts[i*maxBatchSize : (i+1)*maxBatchSize]
|
||||||
unblock <- struct{}{}
|
unblock <- struct{}{}
|
||||||
case <-time.After(time.Second):
|
case <-time.After(5 * time.Second):
|
||||||
t.Fatalf("Alerts were not pushed")
|
t.Fatalf("Alerts were not pushed")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -218,7 +218,7 @@ func TestHandlerFull(t *testing.T) {
|
||||||
case <-called:
|
case <-called:
|
||||||
expected = alerts[i*maxBatchSize : (i+1)*maxBatchSize]
|
expected = alerts[i*maxBatchSize : (i+1)*maxBatchSize]
|
||||||
unblock <- struct{}{}
|
unblock <- struct{}{}
|
||||||
case <-time.After(time.Second):
|
case <-time.After(5 * time.Second):
|
||||||
t.Fatalf("Alerts were not pushed")
|
t.Fatalf("Alerts were not pushed")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue