clientv3/integration: fix "TestLeaseKeepAliveNotFound"

with "default" select, the failure case will never be selected

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
release-3.5
Gyuho Lee 2020-01-17 12:04:10 -08:00
parent 255944bf51
commit 091b84f154
1 changed files with 3 additions and 9 deletions

View File

@ -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")
}
}