--------------------------------------------------------------------------- sendProcess ---------------------------------------------------------------------------
(t *testing.T)
| 383 | // --------------------------------------------------------------------------- |
| 384 | |
| 385 | func TestSendProcess_Normal(t *testing.T) { |
| 386 | ctx, cancel := context.WithCancel(context.Background()) |
| 387 | defer cancel() |
| 388 | pool := newTestBasePool(ctx, cancel) |
| 389 | |
| 390 | bl := newTestBaseline() |
| 391 | pool.sendProcess(bl) |
| 392 | |
| 393 | select { |
| 394 | case got := <-pool.processCh: |
| 395 | if got.UrlString != bl.UrlString { |
| 396 | t.Fatalf("got %q, want %q", got.UrlString, bl.UrlString) |
| 397 | } |
| 398 | case <-time.After(time.Second): |
| 399 | t.Fatal("sendProcess: channel receive timed out") |
| 400 | } |
| 401 | } |
| 402 | |
| 403 | func TestSendProcess_AfterCancel(t *testing.T) { |
| 404 | ctx, cancel := context.WithCancel(context.Background()) |
nothing calls this directly
no test coverage detected