Skip to content

Commit

Permalink
identify: disable racy test when running with race detector (#2526)
Browse files Browse the repository at this point in the history
  • Loading branch information
marten-seemann authored Aug 26, 2023
1 parent c02be32 commit 3441712
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions p2p/protocol/identify/id_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ func emitAddrChangeEvt(t *testing.T, h host.Host) {
// this is because it used to be concurrent. Now, Dial wait till the
// id service is done.
func TestIDService(t *testing.T) {
if race.WithRace() {
t.Skip("This test modifies peerstore.RecentlyConnectedAddrTTL, which is racy.")
}
// This test is highly timing dependent, waiting on timeouts/expiration.
oldTTL := peerstore.RecentlyConnectedAddrTTL
peerstore.RecentlyConnectedAddrTTL = 500 * time.Millisecond
Expand Down

0 comments on commit 3441712

Please sign in to comment.