From ba6688bfcecaeaa85b63e82c0e8ac12d922f0cc2 Mon Sep 17 00:00:00 2001 From: Brian Brazil Date: Mon, 28 Sep 2015 08:34:54 +0100 Subject: [PATCH] retrieval: Reduce flakiness of TestTargetRunScraperScrapes --- retrieval/target_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/retrieval/target_test.go b/retrieval/target_test.go index a64c9ac53..51cb331f2 100644 --- a/retrieval/target_test.go +++ b/retrieval/target_test.go @@ -357,17 +357,17 @@ func TestTargetRunScraperScrapes(t *testing.T) { go testTarget.RunScraper(nopAppender{}) // Enough time for a scrape to happen. - time.Sleep(10 * time.Millisecond) + time.Sleep(20 * time.Millisecond) if testTarget.status.LastScrape().IsZero() { t.Errorf("Scrape hasn't occured.") } testTarget.StopScraper() // Wait for it to take effect. - time.Sleep(5 * time.Millisecond) + time.Sleep(20 * time.Millisecond) last := testTarget.status.LastScrape() // Enough time for a scrape to happen. - time.Sleep(10 * time.Millisecond) + time.Sleep(20 * time.Millisecond) if testTarget.status.LastScrape() != last { t.Errorf("Scrape occured after it was stopped.") }