Skip to content

Commit

Permalink
Merge branch 'master' into chore-sharding-tests-update
Browse files Browse the repository at this point in the history
  • Loading branch information
romanzac authored Mar 20, 2024
2 parents bbf7487 + 7d767c0 commit 77468d6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions waku/v2/peermanager/service_slot_test.go
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 77468d6

Please sign in to comment.