integration: use 'time.Until' in Go 1.8

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
This commit is contained in:
Gyu-Ho Lee 2017-04-13 14:16:10 -07:00
parent cbe37e5213
commit 99a2d6c4b1

View File

@ -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")