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.
This commit is contained in:
Anders Daljord Morken 2016-08-18 09:33:52 +02:00
parent fcac52ebbf
commit 95cadd0702

View file

@ -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)
}()