fix S1000 simplify ch switch cases

Signed-off-by: Ken Sipe <kensipe@gmail.com>

Kubernetes-commit: ba11567617aa8f00d9be01ce2551c49d153cdadf
This commit is contained in:
Ken Sipe 2020-06-26 10:53:08 -05:00 committed by Kubernetes Publisher
parent 32533315c9
commit f5622f5df7
1 changed files with 9 additions and 11 deletions

View File

@ -113,17 +113,15 @@ func TestClientReceivedGOAWAY(t *testing.T) {
count := 0 count := 0
for { for {
select { <-timer.C
case <-timer.C: n, err := w.Write([]byte("w"))
n, err := w.Write([]byte("w")) if err != nil {
if err != nil { return
return }
} flusher.Flush()
flusher.Flush() count += n
count += n if count == watchExpectSendBytes {
if count == watchExpectSendBytes { return
return
}
} }
} }
}) })