Skip to content

Commit

Permalink
identify: disable racy TestLargeIdentifyMessage with race detector (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
marten-seemann authored Jul 10, 2023
1 parent 757bf59 commit 908b273
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions p2p/protocol/identify/id_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (
"github.com/libp2p/go-libp2p/p2p/protocol/identify/pb"

mockClock "github.com/benbjohnson/clock"
"github.com/libp2p/go-libp2p-testing/race"
"github.com/libp2p/go-msgio/pbio"
ma "github.com/multiformats/go-multiaddr"
"github.com/stretchr/testify/assert"
Expand Down Expand Up @@ -560,6 +561,9 @@ func TestSendPush(t *testing.T) {
}

func TestLargeIdentifyMessage(t *testing.T) {
if race.WithRace() {
t.Skip("setting peerstore.RecentlyConnectedAddrTTL is racy")
}
oldTTL := peerstore.RecentlyConnectedAddrTTL
peerstore.RecentlyConnectedAddrTTL = 500 * time.Millisecond
t.Cleanup(func() { peerstore.RecentlyConnectedAddrTTL = oldTTL })
Expand Down

0 comments on commit 908b273

Please sign in to comment.