添加测试文件

This commit is contained in:
meixiongfeng 2022-07-26 10:26:15 +08:00
parent f5a202bfea
commit 3c93c6a3d0
2 changed files with 9 additions and 3 deletions

View File

@ -33,6 +33,14 @@ var user_builders = []*TestCase{
rsp: &pb.UserAddResResp{}, rsp: &pb.UserAddResResp{},
// enabled: true, // enabled: true,
}, },
{
desc: "查看图鉴",
mainType: string(comm.ModuleUser),
subType: "gettujian",
req: &pb.UserGetTujianReq{},
rsp: &pb.UserGetTujianResp{},
enabled: true,
},
{ {
desc: "添加资源", desc: "添加资源",
mainType: string(comm.ModuleUser), mainType: string(comm.ModuleUser),

View File

@ -40,13 +40,11 @@ func (this *DB_Comp) Start() (err error) {
} }
func (this *DB_Comp) run() { func (this *DB_Comp) run() {
timer := time.NewTimer(time.Second * 2)
defer timer.Stop()
for { for {
select { select {
case v := <-this.task: case v := <-this.task:
this.Model_UpdateDBByLog(v) this.Model_UpdateDBByLog(v)
case <-timer.C: case <-time.After(time.Second * 2):
this.Model_UpdateDBByLog("") this.Model_UpdateDBByLog("")
} }
if !this.isInit && this.Model_TotalCount() <= 0 { if !this.isInit && this.Model_TotalCount() <= 0 {