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

Function TestPutToOutput_Normal

core/pool/pool_test.go:461–475  ·  view source on GitHub ↗

--------------------------------------------------------------------------- putToOutput ---------------------------------------------------------------------------

(t *testing.T)

Source from the content-addressed store, hash-verified

459// ---------------------------------------------------------------------------
460
461func TestPutToOutput_Normal(t *testing.T) {
462 ctx, cancel := context.WithCancel(context.Background())
463 defer cancel()
464 pool := newTestBasePool(ctx, cancel)
465
466 pool.putToOutput(newTestBaseline())
467
468 select {
469 case <-pool.OutputCh:
470 case <-time.After(time.Second):
471 t.Fatal("putToOutput: receive timed out")
472 }
473 pool.Outwg.Done()
474 pool.Outwg.Wait()
475}
476
477func TestPutToOutputSnapshotsBaseline(t *testing.T) {
478 ctx, cancel := context.WithCancel(context.Background())

Callers

nothing calls this directly

Calls 4

newTestBasePoolFunction · 0.85
newTestBaselineFunction · 0.85
putToOutputMethod · 0.80
DoneMethod · 0.45

Tested by

no test coverage detected