Skip to content

Commit

Permalink
Revert "integration: remove lease exist checking on randomized expiry"
Browse files Browse the repository at this point in the history
This reverts commit 95bc33f. The new
lease extension algorithm should pass this test.
  • Loading branch information
heyitsanthony committed Jun 21, 2017
1 parent 5c8b5cd commit e938e48
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion integration/v3_lease_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,16 @@ func TestV3LeasePrmote(t *testing.T) {
// it was going to expire anyway.
time.Sleep(3 * time.Second)

// expiring lease should be renewed with randomized delta
if !leaseExist(t, clus, lresp.ID) {
t.Error("unexpected lease not exists")
}

// let lease expires. total lease = 5 seconds and we already
// waits for 3 seconds, so 3 seconds more is enough.
time.Sleep(3 * time.Second)
if leaseExist(t, clus, lresp.ID) {
t.Error("unexpected lease exists")
}
}

// TestV3LeaseRevoke ensures a key is deleted once its lease is revoked.
Expand Down

0 comments on commit e938e48

Please sign in to comment.