Browse Source

integration: use 'time.Until' in Go 1.8

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
Gyu-Ho Lee 8 years ago
parent
commit
99a2d6c4b1
1 changed files with 1 additions and 1 deletions
  1. 1 1
      integration/v3_lease_test.go

+ 1 - 1
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")