]> Sergey Matveev's repositories - btrtrc.git/blobdiff - test/leecher-storage.go
Also change go requirement for fs module
[btrtrc.git] / test / leecher-storage.go
index 49da418297846798525b7a7ab1505518f64415fe..bfb3816db94c6281b1adf280f59de28b7e94e595 100644 (file)
@@ -9,13 +9,14 @@ import (
        "testing/iotest"
 
        "github.com/anacrolix/missinggo/v2/bitmap"
-       "github.com/anacrolix/torrent"
-       "github.com/anacrolix/torrent/internal/testutil"
-       "github.com/anacrolix/torrent/storage"
        "github.com/frankban/quicktest"
        "github.com/stretchr/testify/assert"
        "github.com/stretchr/testify/require"
        "golang.org/x/time/rate"
+
+       "github.com/anacrolix/torrent"
+       "github.com/anacrolix/torrent/internal/testutil"
+       "github.com/anacrolix/torrent/storage"
 )
 
 type LeecherStorageTestCase struct {
@@ -107,6 +108,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 {