From 2603aac445e8f2236d61c2dd6f2fa936c09c856b Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Mon, 17 May 2021 19:59:26 -0700 Subject: [PATCH] remove slow ObservedAddrManager test that doesn't test anything --- p2p/protocol/identify/obsaddr_test.go | 31 --------------------------- 1 file changed, 31 deletions(-) diff --git a/p2p/protocol/identify/obsaddr_test.go b/p2p/protocol/identify/obsaddr_test.go index a4d3e08a2b..1caeaa8135 100644 --- a/p2p/protocol/identify/obsaddr_test.go +++ b/p2p/protocol/identify/obsaddr_test.go @@ -2,11 +2,9 @@ package identify_test import ( "context" - "sync" "testing" "time" - detectrace "github.com/ipfs/go-detect-race" "github.com/libp2p/go-eventbus" "github.com/libp2p/go-libp2p-core/event" "github.com/libp2p/go-libp2p-core/host" @@ -248,35 +246,6 @@ func TestObsAddrSet(t *testing.T) { } } -func TestAddAddrsProfile(t *testing.T) { - if detectrace.WithRace() { - t.Skip("test too slow when the race detector is running") - } - - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - - harness := newHarness(ctx, t) - - addr := ma.StringCast("/ip4/1.2.3.4/tcp/1231") - p := harness.add(ma.StringCast("/ip4/1.2.3.6/tcp/1236")) - - c := harness.conn(p) - var wg sync.WaitGroup - for i := 0; i < 1000; i++ { - wg.Add(1) - go func() { - defer wg.Done() - for j := 0; j < 10000; j++ { - harness.oas.Record(c, addr) - time.Sleep(1 * time.Millisecond) - } - }() - } - - wg.Wait() -} - func TestObservedAddrFiltering(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) defer cancel()