The core protocol of WoopChain
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
woop/api/service/manager_test.go

31 lines
749 B

package service
import (
"testing"
msg_pb "github.com/harmony-one/harmony/api/proto/message"
nodeconfig "github.com/harmony-one/harmony/internal/configs/node"
)
func TestMessageChan(t *testing.T) {
m := &Manager{}
m.SetupServiceManager()
msgChans := make(map[Type]chan *msg_pb.Message)
m.SetupServiceMessageChan(msgChans)
}
func TestInit(t *testing.T) {
if GroupIDShards[nodeconfig.ShardID(0)] != nodeconfig.NewGroupIDByShardID(0) {
t.Errorf("GroupIDShards[0]: %v != GroupIDBeacon: %v",
GroupIDShards[nodeconfig.ShardID(0)],
nodeconfig.NewGroupIDByShardID(0),
)
}
if len(GroupIDShards) != nodeconfig.MaxShards {
t.Errorf("len(GroupIDShards): %v != TotalShards: %v",
len(GroupIDShards),
nodeconfig.MaxShards,
)
}
}