MCPcopy Create free account
hub / github.com/dc0d/workerpool / TestWorkerPoolQuit

Function TestWorkerPoolQuit

workerpool_usage_test.go:109–118  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

107}
108
109func TestWorkerPoolQuit(t *testing.T) {
110 initialWorkers := 10
111 extraWorkers := 10
112
113 pool := workerpool.New(initialWorkers, 2)
114
115 pool.Expand(extraWorkers, 0, nil)
116
117 assert.NoError(t, waitFunc(pool.Stop, _timeout))
118}
119
120func TestTimeoutNoGoroutineLeak(t *testing.T) {
121 initialWorkers := 10

Callers

nothing calls this directly

Calls 2

waitFuncFunction · 0.85
ExpandMethod · 0.80

Tested by

no test coverage detected