mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
clientv3/integration: fix "TestLeaseKeepAliveNotFound"
with "default" select, the failure case will never be selected Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
This commit is contained in:
parent
255944bf51
commit
091b84f154
@ -268,16 +268,10 @@ func TestLeaseKeepAliveNotFound(t *testing.T) {
|
||||
|
||||
<-lchs[0].ch
|
||||
if _, ok := <-lchs[0].ch; !ok {
|
||||
t.Fatalf("closed keepalive on wrong lease")
|
||||
t.Fatal("closed keepalive on wrong lease")
|
||||
}
|
||||
|
||||
timec := time.After(5 * time.Second)
|
||||
for range lchs[1].ch {
|
||||
select {
|
||||
case <-timec:
|
||||
t.Fatalf("revoke did not close keep alive")
|
||||
default:
|
||||
}
|
||||
if _, ok := <-lchs[1].ch; ok {
|
||||
t.Fatal("expected closed keepalive")
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user