mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-10 07:34:04 -08:00
Remove float diff tolerance altogether.
Change-Id: I9ea9683a4665d5800fca75560bb4b8a8b4406d55
This commit is contained in:
parent
d742edfe0d
commit
1ca7f24137
|
@ -2,7 +2,6 @@ package storage_ng
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"math"
|
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"testing"
|
"testing"
|
||||||
"testing/quick"
|
"testing/quick"
|
||||||
|
@ -434,7 +433,7 @@ func verifyStorage(t *testing.T, s Storage, samples clientmodel.Samples, r *rand
|
||||||
}
|
}
|
||||||
want := float64(sample.Value)
|
want := float64(sample.Value)
|
||||||
got := float64(found[0].Value)
|
got := float64(found[0].Value)
|
||||||
if want != got && (want == 0. || math.Abs(want-got)/want > 0.000001) {
|
if want != got {
|
||||||
t.Errorf("Value mismatch, want %f, got %f.", want, got)
|
t.Errorf("Value mismatch, want %f, got %f.", want, got)
|
||||||
result = false
|
result = false
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue