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

Function TestQuit

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

Source from the content-addressed store, hash-verified

94}
95
96func 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
109func TestWorkerPoolQuit(t *testing.T) {
110 initialWorkers := 10

Callers

nothing calls this directly

Calls 2

waitFuncFunction · 0.85
ExpandMethod · 0.80

Tested by

no test coverage detected