]> Sergey Matveev's repositories - btrtrc.git/blobdiff - test/leecher-storage.go
Don't do client transfer tests in parallel
[btrtrc.git] / test / leecher-storage.go
index eac152d6605be04daa6007dba76ca9a354db3c19..a60f077a0a4498facc61be5add4cc3db781a0a7e 100644 (file)
@@ -91,8 +91,6 @@ type testClientTransferParams struct {
 // 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 {
@@ -108,6 +106,8 @@ func testClientTransfer(t *testing.T, ps testClientTransferParams) {
        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 {