testRPCStream mimics a altspb.HandshakerService_DoHandshakeClient object.
| 65 | |
| 66 | // testRPCStream mimics a altspb.HandshakerService_DoHandshakeClient object. |
| 67 | type testRPCStream struct { |
| 68 | grpc.ClientStream |
| 69 | t *testing.T |
| 70 | isClient bool |
| 71 | // The resp expected to be returned by Recv(). Make sure this is set to |
| 72 | // the content the test requires before Recv() is invoked. |
| 73 | recvBuf *altspb.HandshakerResp |
| 74 | // false if it is the first access to Handshaker service on Envelope. |
| 75 | first bool |
| 76 | // useful for testing concurrent calls. |
| 77 | delay time.Duration |
| 78 | // The minimum expected value of the network_latency_ms field in a |
| 79 | // NextHandshakeMessageReq. |
| 80 | minExpectedNetworkLatency time.Duration |
| 81 | } |
| 82 | |
| 83 | func (t *testRPCStream) Recv() (*altspb.HandshakerResp, error) { |
| 84 | resp := t.recvBuf |
nothing calls this directly
no outgoing calls
no test coverage detected