test: workaround the breaking change in jonboulle/clockwork

See
- https://github.com/jonboulle/clockwork/pull/55
- https://github.com/jonboulle/clockwork/blob/v0.3.0/clockwork.go#L42

Signed-off-by: Benjamin Wang <wachao@vmware.com>
storage-doc
Benjamin Wang 2023-04-11 12:01:03 +08:00
parent ff08625126
commit dae1d70189
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ import (
// TestMinExpireTime ensures that any TTL <= minExpireTime becomes Permanent
func TestMinExpireTime(t *testing.T) {
s := newStore()
fc := clockwork.NewFakeClock()
fc := clockwork.NewFakeClockAt(time.Date(1984, time.April, 4, 0, 0, 0, 0, time.UTC))
s.clock = fc
// FakeClock starts at 0, so minExpireTime should be far in the future.. but just in case
testutil.AssertTrue(t, minExpireTime.After(fc.Now()), "minExpireTime should be ahead of FakeClock!")