蛋蛋星球 后台端
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.
 
 
 
 

27 regels
477 B

  1. package svc
  2. import (
  3. "applet/app/cfg"
  4. "applet/app/db"
  5. "applet/app/utils/cache"
  6. "testing"
  7. )
  8. func TestAutoCachingTop100(t *testing.T) {
  9. dbcfg := cfg.DBCfg{
  10. Host: "119.23.182.117:3306",
  11. Name: "egg",
  12. User: "root",
  13. Psw: "Fnuo123com@",
  14. ShowLog: true,
  15. MaxLifetime: 30,
  16. MaxOpenConns: 100,
  17. MaxIdleConns: 100,
  18. Path: "tmp/%s.log",
  19. }
  20. db.InitDB(&dbcfg)
  21. cache.NewRedis("127.0.0.1:6379")
  22. AutoCachingTop100(db.Db)
  23. }