Skip to content

Commit 9b613a8

Browse files
committed
integration: remove lease exist checking on randomized expiry
Lease with TTL 5 should be renewed with randomization, thus it's still possible to exist after 3 seconds. Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
1 parent bf24a0e commit 9b613a8

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

integration/v3_lease_test.go

+1-7
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,10 @@ func TestV3LeasePrmote(t *testing.T) {
6666
// it was going to expire anyway.
6767
time.Sleep(3 * time.Second)
6868

69+
// expiring lease should be renewed with randomized delta
6970
if !leaseExist(t, clus, lresp.ID) {
7071
t.Error("unexpected lease not exists")
7172
}
72-
73-
// let lease expires. total lease = 5 seconds and we already
74-
// waits for 3 seconds, so 3 seconds more is enough.
75-
time.Sleep(3 * time.Second)
76-
if leaseExist(t, clus, lresp.ID) {
77-
t.Error("unexpected lease exists")
78-
}
7973
}
8074

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

0 commit comments

Comments
 (0)