scrape_test.go: Increase scrape interval in TestScrapeLoopCache to reduce potential flakiness

Signed-off-by: machine424 <ayoubmrini424@gmail.com>
This commit is contained in:
machine424 2023-12-26 22:06:03 +01:00
parent 0763ec841b
commit 2f60177203
No known key found for this signature in database
GPG Key ID: A4B001A4FDEE017D
1 changed files with 3 additions and 1 deletions

View File

@ -1194,7 +1194,9 @@ func TestScrapeLoopCache(t *testing.T) {
)
ctx, cancel := context.WithCancel(context.Background())
sl := newBasicScrapeLoop(t, ctx, scraper, app, 10*time.Millisecond)
// Decreasing the scrape interval could make the test fail, as multiple scrapes might be initiated at identical millisecond timestamps.
// See https://github.com/prometheus/prometheus/issues/12727.
sl := newBasicScrapeLoop(t, ctx, scraper, app, 100*time.Millisecond)
numScrapes := 0