]> Sergey Matveev's repositories - btrtrc.git/blobdiff - testing.go
fs: Update path to torrentfs
[btrtrc.git] / testing.go
index ed8251453de2697e156883d0b5b92574414b0855..d3f04b669e8c679da3df629b2bdb7294d4661afc 100644 (file)
@@ -3,6 +3,10 @@ package torrent
 import (
        "testing"
        "time"
+
+       "github.com/anacrolix/log"
+
+       pp "github.com/anacrolix/torrent/peer_protocol"
 )
 
 func TestingConfig(t testing.TB) *ClientConfig {
@@ -14,7 +18,9 @@ func TestingConfig(t testing.TB) *ClientConfig {
        cfg.NoDefaultPortForwarding = true
        cfg.DisableAcceptRateLimiting = true
        cfg.ListenPort = 0
-       cfg.KeepAliveTimeout = time.Microsecond
+       cfg.KeepAliveTimeout = time.Millisecond
+       cfg.MinPeerExtensions.SetBit(pp.ExtensionBitFast, true)
+       cfg.Logger = log.Default.WithContextText(t.Name())
        //cfg.Debug = true
        //cfg.Logger = cfg.Logger.WithText(func(m log.Msg) string {
        //      t := m.Text()