Method: #start_server

Defined in:
src/ruby/spec/channel_connection_spec.rb

#start_server(port = 0) ⇒ Object

[View source]

21
22
23
24
25
26
27
28
# File 'src/ruby/spec/channel_connection_spec.rb', line 21

def start_server(port = 0)
  @srv = new_rpc_server_for_testing(pool_size: 1)
  server_port = @srv.add_http2_port("localhost:#{port}", :this_port_is_insecure)
  @srv.handle(EchoService)
  @server_thd = Thread.new { @srv.run }
  @srv.wait_till_running
  server_port
end