build: fix integer overflow in pkg/tsdb tests on 32bit platforms (#16818)

Several pkg/tsdb tests fail to compile on 32bit platforms due to
integer overflow.
This commit is contained in:
Mark Goodwin
2019-05-06 17:27:45 +10:00
committed by Carl Bergquist
parent f778c1d971
commit 44e6da6b41
4 changed files with 20 additions and 20 deletions

View File

@@ -236,13 +236,13 @@ func TestStackdriver(t *testing.T) {
Convey("timestamps should be in ascending order", func() {
So(res.Series[0].Points[0][0].Float64, ShouldEqual, 0.05)
So(res.Series[0].Points[0][1].Float64, ShouldEqual, 1536670020000)
So(res.Series[0].Points[0][1].Float64, ShouldEqual, int64(1536670020000))
So(res.Series[0].Points[1][0].Float64, ShouldEqual, 1.05)
So(res.Series[0].Points[1][1].Float64, ShouldEqual, 1536670080000)
So(res.Series[0].Points[1][1].Float64, ShouldEqual, int64(1536670080000))
So(res.Series[0].Points[2][0].Float64, ShouldEqual, 1.0666666666667)
So(res.Series[0].Points[2][1].Float64, ShouldEqual, 1536670260000)
So(res.Series[0].Points[2][1].Float64, ShouldEqual, int64(1536670260000))
})
})
@@ -365,9 +365,9 @@ func TestStackdriver(t *testing.T) {
}
Convey("timestamps should be in ascending order", func() {
So(res.Series[0].Points[0][1].Float64, ShouldEqual, 1536668940000)
So(res.Series[0].Points[1][1].Float64, ShouldEqual, 1536669000000)
So(res.Series[0].Points[2][1].Float64, ShouldEqual, 1536669060000)
So(res.Series[0].Points[0][1].Float64, ShouldEqual, int64(1536668940000))
So(res.Series[0].Points[1][1].Float64, ShouldEqual, int64(1536669000000))
So(res.Series[0].Points[2][1].Float64, ShouldEqual, int64(1536669060000))
})
Convey("bucket bounds should be correct", func() {
@@ -410,8 +410,8 @@ func TestStackdriver(t *testing.T) {
}
Convey("timestamps should be in ascending order", func() {
So(res.Series[0].Points[0][1].Float64, ShouldEqual, 1550859086000)
So(res.Series[0].Points[1][1].Float64, ShouldEqual, 1550859146000)
So(res.Series[0].Points[0][1].Float64, ShouldEqual, int64(1550859086000))
So(res.Series[0].Points[1][1].Float64, ShouldEqual, int64(1550859146000))
})
Convey("bucket bounds should be correct", func() {