(t *testing.T)
| 279 | } |
| 280 | |
| 281 | func TestRecvChanLeakGoRoutines(t *testing.T) { |
| 282 | s := RunDefaultServer() |
| 283 | defer s.Shutdown() |
| 284 | |
| 285 | ec := NewEConn(t) |
| 286 | defer ec.Close() |
| 287 | |
| 288 | // Call this to make sure that we have everything setup connection wise |
| 289 | ec.Flush() |
| 290 | |
| 291 | base := getStableNumGoroutine(t) |
| 292 | |
| 293 | ch := make(chan int) |
| 294 | |
| 295 | sub, err := ec.BindRecvChan("foo", ch) |
| 296 | if err != nil { |
| 297 | t.Fatalf("Failed to bind to a send channel: %v\n", err) |
| 298 | } |
| 299 | sub.Unsubscribe() |
| 300 | |
| 301 | checkNoGoroutineLeak(t, base, "Unsubscribe()") |
| 302 | } |
| 303 | |
| 304 | func TestRecvChanMultipleMessages(t *testing.T) { |
| 305 | // Make sure we can receive more than one message. |
nothing calls this directly
no test coverage detected