From 41a39472a1ddffec90f94e0b5d42405553e46ed0 Mon Sep 17 00:00:00 2001 From: Fabian Reinartz Date: Mon, 25 Jan 2016 18:31:54 +0100 Subject: [PATCH] Increase notification test timeouts --- notification/notification.go | 1 - notification/notification_test.go | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/notification/notification.go b/notification/notification.go index 0060047e4..3279bd2c5 100644 --- a/notification/notification.go +++ b/notification/notification.go @@ -274,7 +274,6 @@ func (n *Handler) send(alerts ...*model.Alert) error { func (n *Handler) Stop() { log.Info("Stopping notification handler...") - close(n.more) n.cancel() } diff --git a/notification/notification_test.go b/notification/notification_test.go index 9e6ab6430..29d057b65 100644 --- a/notification/notification_test.go +++ b/notification/notification_test.go @@ -192,7 +192,7 @@ func TestHandlerFull(t *testing.T) { case <-called: expected = alerts[i*maxBatchSize : (i+1)*maxBatchSize] unblock <- struct{}{} - case <-time.After(time.Second): + case <-time.After(5 * time.Second): t.Fatalf("Alerts were not pushed") } } @@ -218,7 +218,7 @@ func TestHandlerFull(t *testing.T) { case <-called: expected = alerts[i*maxBatchSize : (i+1)*maxBatchSize] unblock <- struct{}{} - case <-time.After(time.Second): + case <-time.After(5 * time.Second): t.Fatalf("Alerts were not pushed") } }