ci: fix rounding that created invalid timestamppb.Timestamps
There was a chance this code could `math.Round` up to invalid nanos
for a `timestamppb.Timestamps`. By my rough math, this should've been
a 1 in 100 chance or something, it is one of two flakes that I saw recently.
@@ -360,7 +360,7 @@ func pbTimestampSlice(n int) []*timestamppb.Timestamp {
for i := 0; i < n; i++ {
ts[i] = ptypes.TimestampNow()
// Round off to millis.
- ts[i].Nanos = int32(math.Round(float64(ts[i].Nanos)/float64(time.Millisecond)) *
+ ts[i].Nanos = int32(math.Floor(float64(ts[i].Nanos)/float64(time.Millisecond)) *
float64(time.Millisecond))
}
return ts
