mirror of https://github.com/status-im/go-waku.git
fix: service slot test failure - regression (#1062)
This commit is contained in:
parent
afa124e1ca
commit
7d767c0105
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue