diff --git a/prometheus/histogram_test.go b/prometheus/histogram_test.go index 9546b87..306eee9 100644 --- a/prometheus/histogram_test.go +++ b/prometheus/histogram_test.go @@ -231,13 +231,6 @@ func TestHistogramVecConcurrency(t *testing.T) { rand.Seed(42) - objectives := make([]float64, 0, len(DefObjectives)) - for qu := range DefObjectives { - - objectives = append(objectives, qu) - } - sort.Float64s(objectives) - it := func(n uint32) bool { mutations := int(n%1e4 + 1e4) concLevel := int(n%7 + 1) diff --git a/prometheus/registry_test.go b/prometheus/registry_test.go index e05f2e0..1caeff8 100644 --- a/prometheus/registry_test.go +++ b/prometheus/registry_test.go @@ -256,8 +256,9 @@ collected metric "name" { label: label: 0.001 { t.Errorf("got sample sum %f for label %c, want %f", got, 'A'+i, want) } - for j, wantQ := range objectives { - ε := DefObjectives[wantQ] + for j, wantQ := range objSlice { + ε := objMap[wantQ] gotQ := *m.Summary.Quantile[j].Quantile gotV := *m.Summary.Quantile[j].Value min, max := getBounds(allVars[i], wantQ, ε)