Skip to content

Commit

Permalink
Scale duration
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoPolo committed May 31, 2022
1 parent 86a755c commit 5164981
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions p2p/host/autonat/autonat_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
pb "github.com/libp2p/go-libp2p/p2p/host/autonat/pb"
bhost "github.com/libp2p/go-libp2p/p2p/host/blank"
swarmt "github.com/libp2p/go-libp2p/p2p/net/swarm/testing"
testutils "github.com/libp2p/go-libp2p/testing"

"github.com/libp2p/go-libp2p-core/event"
"github.com/libp2p/go-libp2p-core/host"
Expand Down Expand Up @@ -121,8 +122,8 @@ func TestAutoNATPrivate(t *testing.T) {
connect(t, hs, hc)
require.Eventually(t,
func() bool { return an.Status() == network.ReachabilityPrivate },
2*time.Second,
25*time.Millisecond,
testutils.ScaleDuration(2*time.Second),
testutils.ScaleDuration(25*time.Millisecond),
"expected NAT status to be private",
)
expectEvent(t, s, network.ReachabilityPrivate)
Expand Down

0 comments on commit 5164981

Please sign in to comment.