(c C, wg *sync.WaitGroup, pool NOClientPool, remote proto.NodeID, con int, quest int)
| 55 | } |
| 56 | |
| 57 | func testCaller(c C, wg *sync.WaitGroup, pool NOClientPool, remote proto.NodeID, con int, quest int) { |
| 58 | defer wg.Done() |
| 59 | var finished int32 |
| 60 | caller := NewCallerWithPool(pool) |
| 61 | iwg := &sync.WaitGroup{} |
| 62 | defer iwg.Wait() |
| 63 | for i := 0; i < con; i++ { |
| 64 | iwg.Add(1) |
| 65 | go func(c C) { |
| 66 | defer iwg.Done() |
| 67 | for atomic.AddInt32(&finished, 1) < int32(quest) { |
| 68 | err := caller.CallNode(remote, "Count.Add", &AddReq{Delta: 1}, &AddResp{}) |
| 69 | c.So(err, ShouldBeNil) |
| 70 | } |
| 71 | }(c) |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | func testPCaller(c C, wg *sync.WaitGroup, pool NOClientPool, remote proto.NodeID, con int, quest int) { |
| 76 | defer wg.Done() |
no test coverage detected