添加测试文件

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{},
// enabled: true,
},
{
desc: "查看图鉴",
mainType: string(comm.ModuleUser),
subType: "gettujian",
req: &pb.UserGetTujianReq{},
rsp: &pb.UserGetTujianResp{},
enabled: true,
},
{
desc: "添加资源",
mainType: string(comm.ModuleUser),

View File

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