mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-09 23:24:05 -08:00
skip reloader in failing test
Signed-off-by: Lovro Mažgon <lovro.mazgon@gmail.com>
This commit is contained in:
parent
d60f34a324
commit
582753daa8
|
@ -87,8 +87,9 @@ type Options struct {
|
|||
// Optional HTTP client options to use when scraping.
|
||||
HTTPClientOptions []config_util.HTTPClientOption
|
||||
|
||||
// private option for testability.
|
||||
// private options for testability.
|
||||
skipOffsetting bool
|
||||
skipReloader bool
|
||||
}
|
||||
|
||||
// Manager maintains a set of scrape pools and manages start/stop cycles
|
||||
|
@ -114,7 +115,9 @@ type Manager struct {
|
|||
// Run receives and saves target set updates and triggers the scraping loops reloading.
|
||||
// Reloading happens in the background so that it doesn't block receiving targets updates.
|
||||
func (m *Manager) Run(tsets <-chan map[string][]*targetgroup.Group) error {
|
||||
if !m.opts.skipReloader {
|
||||
go m.reloader()
|
||||
}
|
||||
for {
|
||||
select {
|
||||
case ts := <-tsets:
|
||||
|
|
|
@ -572,7 +572,7 @@ scrape_configs:
|
|||
}
|
||||
|
||||
func TestManagerTargetsUpdates(t *testing.T) {
|
||||
opts := Options{}
|
||||
opts := Options{skipReloader: true}
|
||||
testRegistry := prometheus.NewRegistry()
|
||||
m, err := NewManager(&opts, nil, nil, testRegistry)
|
||||
require.NoError(t, err)
|
||||
|
|
Loading…
Reference in a new issue