修改测试错误
This commit is contained in:
parent
197fb1dbaa
commit
8552265220
@ -2,6 +2,7 @@ package service
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/fox/fox/ipb"
|
||||
"github.com/fox/fox/log"
|
||||
"testing"
|
||||
"time"
|
||||
@ -76,8 +77,8 @@ func (s *gameService) OnMessage(msg []byte) error {
|
||||
func TestGameService(t *testing.T) {
|
||||
log.Open("test.log", log.DebugL)
|
||||
s := newGameService()
|
||||
msg := "hello world"
|
||||
if err := s.Send(Topic(s), []byte(msg)); err != nil {
|
||||
msg := ipb.MakeMsg(GameSrv, 0, 1, 2, []byte("hello world"))
|
||||
if err := s.Send(Topic(s), msg); err != nil {
|
||||
log.Error(err.Error())
|
||||
}
|
||||
s.GetServiceNodes().Range(func(key, value interface{}) bool {
|
||||
|
Loading…
x
Reference in New Issue
Block a user