mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-12 14:27:27 -08:00
Merge pull request #665 from chkno/master
Fix storage/local tests for 32-bit systems
This commit is contained in:
commit
b8fa0a9f8d
|
@ -32,7 +32,7 @@ func newLabelName(ln string) *LabelName {
|
||||||
|
|
||||||
func TestUint64(t *testing.T) {
|
func TestUint64(t *testing.T) {
|
||||||
var b bytes.Buffer
|
var b bytes.Buffer
|
||||||
const n = 422010471112345
|
const n = uint64(422010471112345)
|
||||||
if err := EncodeUint64(&b, n); err != nil {
|
if err := EncodeUint64(&b, n); err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -803,7 +803,7 @@ func createRandomSamples(metricName string, minLen int) clientmodel.Samples {
|
||||||
return clientmodel.SampleValue(rand.Intn(1<<16) - 1<<15 + int(v))
|
return clientmodel.SampleValue(rand.Intn(1<<16) - 1<<15 + int(v))
|
||||||
},
|
},
|
||||||
func(v clientmodel.SampleValue) clientmodel.SampleValue {
|
func(v clientmodel.SampleValue) clientmodel.SampleValue {
|
||||||
return clientmodel.SampleValue(rand.Intn(1<<32) - 1<<31 + int(v))
|
return clientmodel.SampleValue(rand.Int63n(1<<32) - 1<<31 + int64(v))
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue