(t *testing.T)
| 94 | } |
| 95 | |
| 96 | func TestQuit(t *testing.T) { |
| 97 | initialWorkers := 1 |
| 98 | extraWorkers := 10 |
| 99 | |
| 100 | pool := workerpool.New(initialWorkers, 2) |
| 101 | |
| 102 | quit1 := make(chan struct{}) |
| 103 | pool.Expand(extraWorkers, 0, quit1) |
| 104 | close(quit1) |
| 105 | |
| 106 | assert.NoError(t, waitFunc(pool.Stop, _timeout)) |
| 107 | } |
| 108 | |
| 109 | func TestWorkerPoolQuit(t *testing.T) { |
| 110 | initialWorkers := 10 |