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)