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.
35 lines
823 B
35 lines
823 B
package biz |
|
|
|
import ( |
|
"context" |
|
"git.gz.internal.jumaiyx.cn/jm/jmproto/conf" |
|
"git.gz.internal.jumaiyx.cn/job/room-hot-compute/internal/data" |
|
"git.gz.internal.jumaiyx.cn/job/room-hot-compute/pkg/gift" |
|
"git.gz.internal.jumaiyx.cn/job/room-hot-compute/pkg/room" |
|
"git.gz.internal.jumaiyx.cn/pkg/log" |
|
"testing" |
|
) |
|
|
|
func TestNewBiz(t *testing.T) { |
|
l := log.DefaultLogger() |
|
roomServer, err := room.NewRoomService(l) |
|
if err != nil { |
|
t.Fatal(err) |
|
} |
|
giftServer, err := gift.NewGiftService(l) |
|
c := &conf.Data{ |
|
Redis: &conf.Data_Redis{ |
|
Addr: "192.168.1.156:16378", |
|
Password: "MM5ZsXL0", |
|
ReadTimeout: 1, |
|
WriteTimeout: 1, |
|
}, |
|
} |
|
newData, _, err := data.NewData(c, l) |
|
if err != nil { |
|
t.Fatal(err) |
|
} |
|
biz := NewBiz(l, roomServer, giftServer, newData) |
|
ctx := context.TODO() |
|
biz.Check(ctx) |
|
}
|
|
|