demo2_test.go 429 B

12345678910111213141516171819202122232425
  1. package test
  2. import (
  3. "fmt"
  4. "github.com/gogf/gf/frame/g"
  5. "testing"
  6. )
  7. func TestDemo2(t *testing.T) {
  8. t.Run("Adapters_test", test21)
  9. }
  10. func test21(t *testing.T) {
  11. c := make(chan bool)
  12. for i := 0; i < 10000; i++ {
  13. go func() {
  14. i, e := g.Redis().Do("get", "GToken:adminIJ1xz+Wve+ZONVMFfXJQMw==50607842719694a7380dc72aacc4a0b4")
  15. if e != nil {
  16. fmt.Println(e)
  17. }
  18. fmt.Println(string(i.([]byte)))
  19. }()
  20. }
  21. <-c
  22. }