|
@@ -66,10 +66,16 @@ func TestV3LeasePrmote(t *testing.T) {
|
|
|
// it was going to expire anyway.
|
|
// it was going to expire anyway.
|
|
|
time.Sleep(3 * time.Second)
|
|
time.Sleep(3 * time.Second)
|
|
|
|
|
|
|
|
- // expiring lease should be renewed with randomized delta
|
|
|
|
|
if !leaseExist(t, clus, lresp.ID) {
|
|
if !leaseExist(t, clus, lresp.ID) {
|
|
|
t.Error("unexpected lease not exists")
|
|
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.
|
|
// TestV3LeaseRevoke ensures a key is deleted once its lease is revoked.
|