|
|
@ -29,7 +29,6 @@ |
|
|
|
|
|
|
|
|
|
|
|
require 'grpc' |
|
|
|
require 'grpc' |
|
|
|
require 'xray/thread_dump_signal_handler' |
|
|
|
require 'xray/thread_dump_signal_handler' |
|
|
|
require_relative '../port_picker' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def load_test_certs |
|
|
|
def load_test_certs |
|
|
|
test_root = File.join(File.dirname(File.dirname(__FILE__)), 'testdata') |
|
|
|
test_root = File.join(File.dirname(File.dirname(__FILE__)), 'testdata') |
|
|
@ -104,10 +103,10 @@ describe GRPC::RpcServer do |
|
|
|
@noop = proc { |x| x } |
|
|
|
@noop = proc { |x| x } |
|
|
|
|
|
|
|
|
|
|
|
@server_queue = GRPC::Core::CompletionQueue.new |
|
|
|
@server_queue = GRPC::Core::CompletionQueue.new |
|
|
|
port = find_unused_tcp_port |
|
|
|
server_host = '0.0.0.0:0' |
|
|
|
@host = "localhost:#{port}" |
|
|
|
|
|
|
|
@server = GRPC::Core::Server.new(@server_queue, nil) |
|
|
|
@server = GRPC::Core::Server.new(@server_queue, nil) |
|
|
|
@server.add_http2_port(@host) |
|
|
|
server_port = @server.add_http2_port(server_host) |
|
|
|
|
|
|
|
@host = "localhost:#{server_port}" |
|
|
|
@ch = GRPC::Core::Channel.new(@host, nil) |
|
|
|
@ch = GRPC::Core::Channel.new(@host, nil) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|