diff --git a/sdk/metric/internal/aggregate/aggregate_test.go b/sdk/metric/internal/aggregate/aggregate_test.go index 494cee33fb7..6e30286205c 100644 --- a/sdk/metric/internal/aggregate/aggregate_test.go +++ b/sdk/metric/internal/aggregate/aggregate_test.go @@ -40,13 +40,13 @@ var ( fltrBob = attribute.NewSet(userBob) // Sat Jan 01 2000 00:00:00 GMT+0000. - staticTime = time.Unix(946684800, 0) + y2k = time.Unix(946684800, 0) ) // y2kPlus returns the timestamp at n seconds past Sat Jan 01 2000 00:00:00 GMT+0000. func y2kPlus(n int64) time.Time { d := time.Duration(n) * time.Second - return staticTime.Add(d) + return y2k.Add(d) } type clock struct { diff --git a/sdk/metric/internal/aggregate/histogram_test.go b/sdk/metric/internal/aggregate/histogram_test.go index 50547247ea4..38ba1229eb2 100644 --- a/sdk/metric/internal/aggregate/histogram_test.go +++ b/sdk/metric/internal/aggregate/histogram_test.go @@ -344,7 +344,7 @@ func TestCumulativeHistogramImutableCounts(t *testing.T) { func TestDeltaHistogramReset(t *testing.T) { orig := now - now = func() time.Time { return staticTime } + now = func() time.Time { return y2k } t.Cleanup(func() { now = orig }) h := newHistogram[int64](bounds, noMinMax, false, 0, dropExemplars[int64])