class CheckCallAfterFinishedService

a test service that holds onto call objects and uses them after the server-side call has been finished

Attributes

server_side_call[R]

Public Instance Methods

a_bidi_rpc(requests, call) click to toggle source
# File src/ruby/spec/generic/rpc_server_spec.rb, line 138
def a_bidi_rpc(requests, call)
  fail 'shouldnt reuse service' unless @server_side_call.nil?
  @server_side_call = call
  requests.each { |r| GRPC.logger.info(r) }
  [EchoMsg.new, EchoMsg.new]
end
a_client_streaming_rpc(call) click to toggle source
# File src/ruby/spec/generic/rpc_server_spec.rb, line 124
def a_client_streaming_rpc(call)
  fail 'shouldnt reuse service' unless @server_side_call.nil?
  @server_side_call = call
  # iterate through requests so call can complete
  call.each_remote_read.each { |r| GRPC.logger.info(r) }
  EchoMsg.new
end
a_server_streaming_rpc(_, call) click to toggle source
# File src/ruby/spec/generic/rpc_server_spec.rb, line 132
def a_server_streaming_rpc(_, call)
  fail 'shouldnt reuse service' unless @server_side_call.nil?
  @server_side_call = call
  [EchoMsg.new, EchoMsg.new]
end
an_rpc(req, call) click to toggle source
# File src/ruby/spec/generic/rpc_server_spec.rb, line 118
def an_rpc(req, call)
  fail 'shouldnt reuse service' unless @server_side_call.nil?
  @server_side_call = call
  req
end