From 3e2d52162e731dfa8a351a225f749cf2b99da529 Mon Sep 17 00:00:00 2001 From: Gyu-Ho Lee Date: Thu, 13 Apr 2017 11:05:21 -0700 Subject: [PATCH] integration: use 'time.Until' ref. https://github.com/coreos/etcd/issues/6174. Signed-off-by: Gyu-Ho Lee --- integration/v3_lease_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration/v3_lease_test.go b/integration/v3_lease_test.go index a1599f6dc4da..f03ee2201742 100644 --- a/integration/v3_lease_test.go +++ b/integration/v3_lease_test.go @@ -484,7 +484,7 @@ func TestV3LeaseFailover(t *testing.T) { clus.waitLeader(t, clus.Members) // lease should not expire at the last received expire deadline. - time.Sleep(expectedExp.Sub(time.Now()) - 500*time.Millisecond) + time.Sleep(time.Until(expectedExp) - 500*time.Millisecond) if !leaseExist(t, clus, lresp.ID) { t.Error("unexpected lease not exists")