MCPcopy Create free account
hub / github.com/chainreactors/spray / newTestBasePool

Function newTestBasePool

core/pool/pool_test.go:24–40  ·  view source on GitHub ↗

--------------------------------------------------------------------------- helpers ---------------------------------------------------------------------------

(ctx context.Context, cancel context.CancelFunc)

Source from the content-addressed store, hash-verified

22// ---------------------------------------------------------------------------
23
24func newTestBasePool(ctx context.Context, cancel context.CancelFunc) *BasePool {
25 return &BasePool{
26 Config: &Config{
27 Thread: 4,
28 OutputCh: make(chan *baseline.Baseline, 100),
29 FuzzyCh: make(chan *baseline.Baseline, 100),
30 Outwg: &sync.WaitGroup{},
31 },
32 ctx: ctx,
33 Cancel: cancel,
34 additionCh: make(chan *Unit, 40), // Thread*10
35 closeCh: make(chan struct{}),
36 processCh: make(chan *baseline.Baseline, 8), // Thread*2
37 wg: &sync.WaitGroup{},
38 handlerDone: make(chan struct{}),
39 }
40}
41
42func newTestBaseline() *baseline.Baseline {
43 return &baseline.Baseline{

Calls

no outgoing calls

Tested by

no test coverage detected