1234567891011121314151617181920212223242526 |
- package proxy
- import (
- "sync"
- "testing"
- )
- func TestProxy(t *testing.T) {
- var wait sync.WaitGroup
- wait.Add(1)
- Regist("test", TCPArgs{
- Local: ":8100",
- Parent: "10.0.1.174:5555",
- Timeout: 1500,
- PoolSize: 5,
- CheckParentInterval: 30,
- OutCallback: func() bool {
- return true
- },
- })
- err := Run("test")
- if err != nil {
- wait.Done()
- }
- wait.Wait()
- }
|