Merge pull request #13336 from machine424/flakky

scrape_test.go: Increase scrape interval in TestScrapeLoopCache
to reduce potential flakiness.
This commit is contained in:
Bryan Boreham 2024-01-18 14:12:55 +00:00 committed by GitHub
commit 4ad9b6df2e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -1211,7 +1211,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