From dae1d701899cec08dbf6b6802a97df8fb4247262 Mon Sep 17 00:00:00 2001 From: Benjamin Wang Date: Tue, 11 Apr 2023 12:01:03 +0800 Subject: [PATCH] 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 --- server/etcdserver/api/v2store/store_ttl_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/etcdserver/api/v2store/store_ttl_test.go b/server/etcdserver/api/v2store/store_ttl_test.go index 7da08f229..a0bac3e8c 100644 --- a/server/etcdserver/api/v2store/store_ttl_test.go +++ b/server/etcdserver/api/v2store/store_ttl_test.go @@ -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!")