Call closer.Close() earlier.

This commit is contained in:
Johannes 'fish' Ziemke 2013-04-25 13:29:28 +02:00
parent 22da76e8ab
commit 1ad41d4c00

View file

@ -508,7 +508,6 @@ func TestGetAllValuesForLabel(t *testing.T) {
for i, scenario := range scenarios {
tiered, closer := newTestTieredStorage(t)
defer closer.Close()
for j, metric := range scenario.in {
sample := model.Sample{
Metric: model.Metric{model.MetricNameLabel: model.LabelValue(metric.metricName)},
@ -525,6 +524,7 @@ func TestGetAllValuesForLabel(t *testing.T) {
}
}
metricNames, err := tiered.GetAllValuesForLabel(model.MetricNameLabel)
closer.Close()
if err != nil {
t.Fatalf("%d. Error getting metric names: %s", i, err)
}