Skip to content
Snippets Groups Projects
Commit 391664af authored by Tim Emiola's avatar Tim Emiola
Browse files

Improves test stability

parent 504e379a
No related branches found
No related tags found
No related merge requests found
-I. -I.
-Ipb -Ipb
--backtrace
--require spec_helper --require spec_helper
--format documentation --format documentation
--color --color
...@@ -417,18 +417,18 @@ module GRPC ...@@ -417,18 +417,18 @@ module GRPC
begin begin
an_rpc = @server.request_call(@cq, loop_tag, INFINITE_FUTURE) an_rpc = @server.request_call(@cq, loop_tag, INFINITE_FUTURE)
c = new_active_server_call(an_rpc) c = new_active_server_call(an_rpc)
unless c.nil?
mth = an_rpc.method.to_sym
@pool.schedule(c) do |call|
rpc_descs[mth].run_server_method(call, rpc_handlers[mth])
end
end
rescue Core::CallError, RuntimeError => e rescue Core::CallError, RuntimeError => e
# these might happen for various reasonse. The correct behaviour of # these might happen for various reasonse. The correct behaviour of
# the server is to log them and continue, if it's not shutting down. # the server is to log them and continue, if it's not shutting down.
GRPC.logger.warn("server call failed: #{e}") unless stopped? GRPC.logger.warn("server call failed: #{e}") unless stopped?
next next
end end
unless c.nil?
mth = an_rpc.method.to_sym
@pool.schedule(c) do |call|
rpc_descs[mth].run_server_method(call, rpc_handlers[mth])
end
end
end end
@running = false @running = false
GRPC.logger.info("stopped: #{self}") GRPC.logger.info("stopped: #{self}")
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
require 'grpc' require 'grpc'
require 'spec_helper'
include GRPC::Core include GRPC::Core
...@@ -47,7 +46,7 @@ shared_context 'setup: tags' do ...@@ -47,7 +46,7 @@ shared_context 'setup: tags' do
end end
def deadline def deadline
Time.now + 2 Time.now + 5
end end
def server_allows_client_to_proceed def server_allows_client_to_proceed
......
...@@ -179,7 +179,6 @@ describe Grpc::Health::Checker do ...@@ -179,7 +179,6 @@ describe Grpc::Health::Checker do
describe 'running on RpcServer' do describe 'running on RpcServer' do
RpcServer = GRPC::RpcServer RpcServer = GRPC::RpcServer
StatusCodes = GRPC::Core::StatusCodes
CheckerStub = Grpc::Health::Checker.rpc_stub_class CheckerStub = Grpc::Health::Checker.rpc_stub_class
before(:each) do before(:each) do
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment