mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
integration: ensure revoke completes before TimeToLive
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
This commit is contained in:
parent
fdf445b5a0
commit
01b6cdf13d
@ -360,12 +360,16 @@ func TestV3GetNonExistLease(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, client := range clus.clients {
|
for _, client := range clus.clients {
|
||||||
|
// quorum-read to ensure revoke completes before TimeToLive
|
||||||
|
if _, err := toGRPC(client).KV.Range(ctx, &pb.RangeRequest{Key: []byte("_")}); err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
resp, err := toGRPC(client).Lease.LeaseTimeToLive(ctx, leaseTTLr)
|
resp, err := toGRPC(client).Lease.LeaseTimeToLive(ctx, leaseTTLr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("expected non nil error, but go %v", err)
|
t.Fatalf("expected non nil error, but go %v", err)
|
||||||
}
|
}
|
||||||
if resp.TTL != -1 {
|
if resp.TTL != -1 {
|
||||||
t.Fatalf("expected TTL to be -1, but got %v \n", resp.TTL)
|
t.Fatalf("expected TTL to be -1, but got %v", resp.TTL)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user