unity容器监听
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.
 
 
 

41 lines
793 B

package biz
import (
"context"
"git.gz.internal.jumaiyx.cn/job/room-server-clear/pkg/room"
k8s_client "git.gz.internal.jumaiyx.cn/pkg/k8s-client"
"git.gz.internal.jumaiyx.cn/pkg/log"
"testing"
"time"
)
func TestNewBiz(t *testing.T) {
l := log.DefaultLogger()
roomServer, err := room.NewRoomService(l)
if err != nil {
t.Fatal(err)
}
deploy, err := k8s_client.NewDeployment(k8s_client.UnityNamespace, l)
if err != nil {
t.Fatal(err)
}
ser, err := k8s_client.NewService(k8s_client.UnityNamespace, l)
if err != nil {
t.Fatal(err)
}
n := NewBiz(l, roomServer)
n.room = roomServer
n.deploy = deploy
n.ser = ser
ctx := context.TODO()
go func() {
n.Deployment(ctx)
}()
go func() {
n.Service(ctx)
}()
go func() {
n.Room(ctx)
}()
time.Sleep(time.Second * 30)
}