(t *testing.T)
| 100 | } |
| 101 | |
| 102 | func TestClient_reportErr(t *testing.T) { |
| 103 | c := NewClient() |
| 104 | |
| 105 | if c.reportErr(nil) { |
| 106 | t.Error("should return false on no error") |
| 107 | } |
| 108 | |
| 109 | // fill in errs buffer |
| 110 | for i := 0; i < 100; i++ { |
| 111 | c.reportErr(errors.New("test err")) |
| 112 | } |
| 113 | |
| 114 | // should not block, error will be discarded |
| 115 | if !c.reportErr(errors.New("test err")) { |
| 116 | t.Error("should return true") |
| 117 | } |
| 118 | } |
| 119 | |
| 120 | func TestClient_channel(t *testing.T) {} |
| 121 |