Commit 70089c98 authored by hujiebin's avatar hujiebin

Update test_fruit_machine.go

parent 3307e57b
...@@ -25,6 +25,8 @@ func main() { ...@@ -25,6 +25,8 @@ func main() {
if err := mysql.TestDB.Model(model.User{}).Where("code in ?", fruitUserCodes).Find(&users).Error; err != nil { if err := mysql.TestDB.Model(model.User{}).Where("code in ?", fruitUserCodes).Find(&users).Error; err != nil {
panic(err) panic(err)
} }
for i := 0; i < 10; i++ {
go func() {
for { for {
times := 20 + rand.Intn(30) times := 20 + rand.Intn(30)
for i := 0; i < times; i++ { for i := 0; i < times; i++ {
...@@ -67,9 +69,12 @@ func main() { ...@@ -67,9 +69,12 @@ func main() {
fmt.Println(err) fmt.Println(err)
return return
} }
fmt.Println(string(body)) fmt.Printf("body:%v,uid:%v\n", string(body), u.Id)
} }
} }
//time.Sleep(time.Second * 55) //time.Sleep(time.Second * 55)
} }
}()
}
time.Sleep(time.Hour)
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment