Class: CheckCallAfterFinishedService
- Inherits:
-
Object
- Object
- CheckCallAfterFinishedService
- Includes:
- GRPC::GenericService
- Defined in:
- src/ruby/spec/generic/rpc_server_spec.rb
Overview
a test service that holds onto call objects and uses them after the server-side call has been finished
Instance Attribute Summary collapse
-
#server_side_call ⇒ Object
readonly
Returns the value of attribute server_side_call.
Instance Method Summary collapse
- #a_bidi_rpc(requests, call) ⇒ Object
- #a_client_streaming_rpc(call) ⇒ Object
- #a_server_streaming_rpc(_, call) ⇒ Object
- #an_rpc(req, call) ⇒ Object
Methods included from GRPC::GenericService
Instance Attribute Details
#server_side_call ⇒ Object (readonly)
Returns the value of attribute server_side_call.
124 125 126 |
# File 'src/ruby/spec/generic/rpc_server_spec.rb', line 124 def server_side_call @server_side_call end |
Instance Method Details
#a_bidi_rpc(requests, call) ⇒ Object
146 147 148 149 150 151 |
# File 'src/ruby/spec/generic/rpc_server_spec.rb', line 146 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) ⇒ Object
132 133 134 135 136 137 138 |
# File 'src/ruby/spec/generic/rpc_server_spec.rb', line 132 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) ⇒ Object
140 141 142 143 144 |
# File 'src/ruby/spec/generic/rpc_server_spec.rb', line 140 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) ⇒ Object
126 127 128 129 130 |
# File 'src/ruby/spec/generic/rpc_server_spec.rb', line 126 def an_rpc(req, call) fail 'shouldnt reuse service' unless @server_side_call.nil? @server_side_call = call req end |