From 95cadd07029abce1557bdca00ec75c828dea7813 Mon Sep 17 00:00:00 2001 From: Anders Daljord Morken Date: Thu, 18 Aug 2016 09:33:52 +0200 Subject: [PATCH] Run scrape loop with interval 1 instead of 0 0 is considered an invalid interval by time.NewTicker() and will cause a panic if control reaches that point. Given the vagaries of timekeeping, this may occasionally happen and make this test unstable. --- retrieval/scrape_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/retrieval/scrape_test.go b/retrieval/scrape_test.go index 8aa5da2fec..bb641d4cd3 100644 --- a/retrieval/scrape_test.go +++ b/retrieval/scrape_test.go @@ -329,7 +329,7 @@ func TestScrapeLoopStop(t *testing.T) { runDone := make(chan struct{}) go func() { - sl.run(0, 0, nil) + sl.run(1, 0, nil) close(runDone) }()