Skip to content

Commit

Permalink
Try increasing timeouts if we're in CI for this test (#1796)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoPolo committed Oct 6, 2022
1 parent b54a26b commit 1a819be
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions p2p/transport/quic/reuse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package libp2pquic
import (
"bytes"
"net"
"os"
"runtime/pprof"
"strings"
"testing"
Expand Down Expand Up @@ -144,6 +145,11 @@ func TestReuseGarbageCollect(t *testing.T) {
})
garbageCollectInterval = 50 * time.Millisecond
maxUnusedDuration = 100 * time.Millisecond
if os.Getenv("CI") != "" {
// Increase these timeouts if in CI
garbageCollectInterval = 10 * garbageCollectInterval
maxUnusedDuration = 10 * maxUnusedDuration
}

reuse := newReuse()
cleanup(t, reuse)
Expand Down

0 comments on commit 1a819be

Please sign in to comment.