From 3441712a9d1fb0ee1564d19a019a56f78a8de230 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Sat, 26 Aug 2023 23:28:35 +0700 Subject: [PATCH] identify: disable racy test when running with race detector (#2526) --- p2p/protocol/identify/id_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/p2p/protocol/identify/id_test.go b/p2p/protocol/identify/id_test.go index b18ba51ca5..61c7d87acc 100644 --- a/p2p/protocol/identify/id_test.go +++ b/p2p/protocol/identify/id_test.go @@ -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