From 7d767c0105cc7c031bccf7446dc0d4a8fb8aeabe Mon Sep 17 00:00:00 2001 From: Roman Zajic Date: Wed, 20 Mar 2024 12:11:06 +0800 Subject: [PATCH] fix: service slot test failure - regression (#1062) --- waku/v2/peermanager/service_slot_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/waku/v2/peermanager/service_slot_test.go b/waku/v2/peermanager/service_slot_test.go index b97c231e..5b7ac986 100644 --- a/waku/v2/peermanager/service_slot_test.go +++ b/waku/v2/peermanager/service_slot_test.go @@ -1,12 +1,11 @@ package peermanager import ( - "testing" - "github.com/libp2p/go-libp2p/core/peer" libp2pProtocol "github.com/libp2p/go-libp2p/core/protocol" "github.com/stretchr/testify/require" "golang.org/x/exp/maps" + "testing" ) func TestServiceSlot(t *testing.T) { @@ -41,8 +40,10 @@ func TestServiceSlot(t *testing.T) { require.NoError(t, err) require.Equal(t, 2, len(maps.Keys(fetchedPeers))) + fetchedPeersSerialized := maps.Keys(fetchedPeers) + // Check for uniqueness - require.NotEqual(t, maps.Keys(fetchedPeers)[0], maps.Keys(fetchedPeers)[1]) + require.NotEqual(t, fetchedPeersSerialized[0], fetchedPeersSerialized[1]) slots.getPeers(protocol).remove(peerID2)