redis rpc服务, 提供redis操作方法
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.

24 lines
317 B

  1. package redisrpc
  2. import (
  3. "log"
  4. "testing"
  5. // "time"
  6. )
  7. func Test_ReduceStock(t *testing.T) {
  8. ch := make(chan int)
  9. for i := 0; i < 100; i++ {
  10. go func() {
  11. log.Println("start")
  12. reply, err := ReduceStock("test_watch", "2")
  13. log.Println(reply)
  14. log.Println(err)
  15. log.Println("end")
  16. }()
  17. }
  18. <-ch
  19. }