From e5f92d35fec1ad8702becd2a8dd2dae5a479c709 Mon Sep 17 00:00:00 2001 From: Scott Worley Date: Thu, 30 Apr 2015 14:19:48 -0700 Subject: [PATCH] Fix storage/local tests for 32-bit systems --- storage/local/codable/codable_test.go | 2 +- storage/local/storage_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/storage/local/codable/codable_test.go b/storage/local/codable/codable_test.go index 501399913..d5c9cdf83 100644 --- a/storage/local/codable/codable_test.go +++ b/storage/local/codable/codable_test.go @@ -32,7 +32,7 @@ func newLabelName(ln string) *LabelName { func TestUint64(t *testing.T) { var b bytes.Buffer - const n = 422010471112345 + const n = uint64(422010471112345) if err := EncodeUint64(&b, n); err != nil { t.Fatal(err) } diff --git a/storage/local/storage_test.go b/storage/local/storage_test.go index 6ebbb1a36..9801d6b0e 100644 --- a/storage/local/storage_test.go +++ b/storage/local/storage_test.go @@ -803,7 +803,7 @@ func createRandomSamples(metricName string, minLen int) clientmodel.Samples { return clientmodel.SampleValue(rand.Intn(1<<16) - 1<<15 + int(v)) }, 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)) }, }, },