mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-26 22:19:40 -08:00
Call closer.Close() earlier.
This commit is contained in:
parent
22da76e8ab
commit
1ad41d4c00
|
@ -508,7 +508,6 @@ func TestGetAllValuesForLabel(t *testing.T) {
|
||||||
|
|
||||||
for i, scenario := range scenarios {
|
for i, scenario := range scenarios {
|
||||||
tiered, closer := newTestTieredStorage(t)
|
tiered, closer := newTestTieredStorage(t)
|
||||||
defer closer.Close()
|
|
||||||
for j, metric := range scenario.in {
|
for j, metric := range scenario.in {
|
||||||
sample := model.Sample{
|
sample := model.Sample{
|
||||||
Metric: model.Metric{model.MetricNameLabel: model.LabelValue(metric.metricName)},
|
Metric: model.Metric{model.MetricNameLabel: model.LabelValue(metric.metricName)},
|
||||||
|
@ -525,6 +524,7 @@ func TestGetAllValuesForLabel(t *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
metricNames, err := tiered.GetAllValuesForLabel(model.MetricNameLabel)
|
metricNames, err := tiered.GetAllValuesForLabel(model.MetricNameLabel)
|
||||||
|
closer.Close()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("%d. Error getting metric names: %s", i, err)
|
t.Fatalf("%d. Error getting metric names: %s", i, err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue