in continuous_load_testing/client.go [175:192]
func ExecuteStreamingInputCalls(ctx context.Context, tc test.TestServiceClient) error {
stream, err := tc.StreamingInputCall(ctx)
if err != nil {
return fmt.Errorf("%v.StreamingInputCall(_) = _, %v", tc, err)
}
for i := 0; i < *numOfRequests; i++ {
req := &messages.StreamingInputCallRequest{}
if err := stream.Send(req); err != nil {
return fmt.Errorf("%v has error %v while sending %v", stream, err, req)
}
}
_, err = stream.CloseAndRecv()
if err != nil {
return fmt.Errorf("%v.CloseAndRecv() got error %v, want %v", stream, err, nil)
}
return nil
}