mux_broker_test.go: range over chan for simplicity
This commit is contained in:
parent
9a31d0de58
commit
2944030daf
|
@ -46,13 +46,9 @@ func TestMuxBroker(t *testing.T) {
|
|||
t.Fatalf("bad: %d", data[0])
|
||||
}
|
||||
|
||||
for {
|
||||
err, open := <-errChan
|
||||
if !open {
|
||||
if err != nil {
|
||||
t.Fatalf(err.Error())
|
||||
}
|
||||
break
|
||||
for err := range errChan {
|
||||
if err != nil {
|
||||
t.Fatalf(err.Error())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue