]> Sergey Matveev's repositories - btrtrc.git/blobdiff - ut-holepunching_test.go
Drop peer request alloc reservations when peer is closed
[btrtrc.git] / ut-holepunching_test.go
index fe73e8d11b050420a03a73c47a9e0655bb27961d..a45eb8e591d7154bdf211493ecbac7c6538b2d58 100644 (file)
@@ -94,9 +94,20 @@ func TestHolepunchConnect(t *testing.T) {
        log.Printf("trying to initiate to %v", targetAddr)
        llg.initiateConn(PeerInfo{
                Addr: targetAddr,
-       }, true, false)
+       }, true, false, false, false)
        llg.cl.unlock()
        wg.Wait()
+       // These checks would require that the leecher leecher first attempt to connect without
+       // holepunching.
+
+       //llClientStats := leecherLeecher.Stats()
+       //c := qt.New(t)
+       //c.Check(llClientStats.NumPeersDialedRequiringHolepunch, qt.Not(qt.Equals), 0)
+       //c.Check(
+       //      llClientStats.NumPeersDialedRequiringHolepunch,
+       //      qt.Equals,
+       //      llClientStats.NumPeersUndiableWithoutHolepunch,
+       //)
 }
 
 func waitForConns(t *Torrent) {