Skip to content
/ etcd Public
forked from etcd-io/etcd

Commit

Permalink
integration: use 'time.Until'
Browse files Browse the repository at this point in the history
ref. etcd-io#6174.

Signed-off-by: Gyu-Ho Lee <[email protected]>
  • Loading branch information
gyuho committed Apr 13, 2017
1 parent 238f3ab commit f9a8fdd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion integration/v3_lease_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit f9a8fdd

Please sign in to comment.