From 5244a9be60e228abf65eb60f1fdab3d37beba422 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ljubi=C5=A1a=20Ga=C4=8Devi=C4=87?= <35105035+gacevicljubisa@users.noreply.github.com> Date: Thu, 28 Nov 2024 10:25:13 +0100 Subject: [PATCH] test: unskip TestWithBlocklistStreams test (#4912) --- pkg/p2p/libp2p/connections_test.go | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/pkg/p2p/libp2p/connections_test.go b/pkg/p2p/libp2p/connections_test.go index 22d3c0ab58d..c85b016d801 100644 --- a/pkg/p2p/libp2p/connections_test.go +++ b/pkg/p2p/libp2p/connections_test.go @@ -433,7 +433,8 @@ func TestDoubleConnectOnAllAddresses(t *testing.T) { notifier: mockNotifier(noopCf, noopDf, true), libp2pOpts: libp2p.Options{ FullNode: true, - }}) + }, + }) addrs, err := s1.Addresses() if err != nil { t.Fatal(err) @@ -1019,7 +1020,6 @@ func TestWithDisconnectStreams(t *testing.T) { func TestWithBlocklistStreams(t *testing.T) { t.Parallel() - t.Skip("this test always fails") ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -1369,9 +1369,11 @@ type ( reachableFunc func(swarm.Address, p2p.ReachabilityStatus) ) -var noopCf = func(context.Context, p2p.Peer, bool) error { return nil } -var noopDf = func(p2p.Peer) {} -var noopAnnounce = func(context.Context, swarm.Address, bool) error { return nil } -var noopAnnounceTo = func(context.Context, swarm.Address, swarm.Address, bool) error { return nil } -var noopReachability = func(p2p.ReachabilityStatus) {} -var noopReachable = func(swarm.Address, p2p.ReachabilityStatus) {} +var ( + noopCf = func(context.Context, p2p.Peer, bool) error { return nil } + noopDf = func(p2p.Peer) {} + noopAnnounce = func(context.Context, swarm.Address, bool) error { return nil } + noopAnnounceTo = func(context.Context, swarm.Address, swarm.Address, bool) error { return nil } + noopReachability = func(p2p.ReachabilityStatus) {} + noopReachable = func(swarm.Address, p2p.ReachabilityStatus) {} +)