forked from mirrors/statsd_exporter
Improving isolation of metric conflict test
Signed-off-by: Pedro Tanaka <pedro.stanaka@gmail.com>
This commit is contained in:
parent
e85098da3f
commit
30c3e31574
1 changed files with 3 additions and 2 deletions
|
@ -520,10 +520,11 @@ mappings:
|
||||||
events <- s.in
|
events <- s.in
|
||||||
close(events)
|
close(events)
|
||||||
}()
|
}()
|
||||||
ex := NewExporter(prometheus.DefaultRegisterer, testMapper, log.NewNopLogger(), eventsActions, eventsUnmapped, errorEventStats, eventStats, conflictingEventStats, metricsCount)
|
registerer := prometheus.NewRegistry()
|
||||||
|
ex := NewExporter(registerer, testMapper, log.NewNopLogger(), eventsActions, eventsUnmapped, errorEventStats, eventStats, conflictingEventStats, metricsCount)
|
||||||
ex.Listen(events)
|
ex.Listen(events)
|
||||||
|
|
||||||
metrics, err := prometheus.DefaultGatherer.Gather()
|
metrics, err := registerer.Gather()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("Cannot gather from DefaultGatherer: %v", err)
|
t.Fatalf("Cannot gather from DefaultGatherer: %v", err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue