mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-08 03:33:56 +00:00
fix S1000 simplify ch switch cases
Signed-off-by: Ken Sipe <kensipe@gmail.com>
This commit is contained in:
parent
268c2f81c7
commit
ba11567617
@ -113,17 +113,15 @@ func TestClientReceivedGOAWAY(t *testing.T) {
|
||||
|
||||
count := 0
|
||||
for {
|
||||
select {
|
||||
case <-timer.C:
|
||||
n, err := w.Write([]byte("w"))
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
flusher.Flush()
|
||||
count += n
|
||||
if count == watchExpectSendBytes {
|
||||
return
|
||||
}
|
||||
<-timer.C
|
||||
n, err := w.Write([]byte("w"))
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
flusher.Flush()
|
||||
count += n
|
||||
if count == watchExpectSendBytes {
|
||||
return
|
||||
}
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user