12345678910111213141516171819202122232425262728293031 |
- package services_test
- import (
- "testing"
- "time"
- "fpdxfeed/services"
- "fpdxfeed/config"
- "fpdxfeed/database"
- )
- func TestExecTask(t *testing.T) {
- conf, _ := config.NewConfig("../.env.yml")
- conns, _ := database.NewConns(conf)
- debug := 0
- goLimit := 10
- sleep := int64(1)
- sleepDuration := time.Duration(sleep) * time.Minute
- n0 := 1
- dt1 := 0.1
- dt2 := 0.2
- dt3 := 0.3
- dt4 := 0.4
- s, _ := services.NewService(conf, conns, debug, goLimit, sleepDuration, n0, dt1, dt2, dt3, dt4)
- s.Run()
- }
|