Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
scrape_test: add scrape offset in test scraper to avoid race
This change adds an offset to the test scraper so a scrape is not initiated when the context is cancelled. Without this change, there was a race between the context cancellation and the scrape jitter wait and this change fixes that. Can verify using: go test -run ^TestScrapeLoopStopBeforeRun$ github.com/prometheus/prometheus/scrape -race -count 1000 Signed-off-by: Ridwan Sharif <ridwanmsharif@google.com>
- Loading branch information