// Creates a seeder and a leecher, and ensures the data transfers when a read
// is attempted on the leecher.
func testClientTransfer(t *testing.T, ps testClientTransferParams) {
- t.Parallel()
-
prevGOMAXPROCS := runtime.GOMAXPROCS(ps.GOMAXPROCS)
newGOMAXPROCS := prevGOMAXPROCS
if ps.GOMAXPROCS > 0 {
cfg := torrent.TestingConfig(t)
// cfg.Debug = true
cfg.Seed = true
+ // Less than a piece, more than a single request.
+ cfg.MaxAllocPeerRequestDataPerConn = 4
// Some test instances don't like this being on, even when there's no cache involved.
cfg.DropMutuallyCompletePeers = false
if ps.SeederUploadRateLimiter != nil {