From 1674737df181aaaeb218c90964efc526d7ae2b17 Mon Sep 17 00:00:00 2001 From: sukun Date: Thu, 26 Oct 2023 12:56:49 +0530 Subject: [PATCH] fix test race --- p2p/protocol/identify/id_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/p2p/protocol/identify/id_test.go b/p2p/protocol/identify/id_test.go index 61c7d87acc..4adc84b10e 100644 --- a/p2p/protocol/identify/id_test.go +++ b/p2p/protocol/identify/id_test.go @@ -844,8 +844,10 @@ func TestIncomingIDStreamsTimeout(t *testing.T) { func TestOutOfOrderConnectedNotifs(t *testing.T) { h1, err := libp2p.New(libp2p.NoListenAddrs) require.NoError(t, err) + defer h1.Close() h2, err := libp2p.New(libp2p.ListenAddrs(ma.StringCast("/ip4/127.0.0.1/udp/0/quic-v1"))) require.NoError(t, err) + defer h2.Close() doneCh := make(chan struct{}) errCh := make(chan error)