From 1014a4ef98f3e821ef34b1e5baab145995f9d28b Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Fri, 1 Apr 2016 14:11:55 -0700 Subject: [PATCH 1/3] Flatten Node coverage reports by one level to avoid issues with redirects --- third_party/boringssl | 2 +- tools/run_tests/run_node.sh | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/third_party/boringssl b/third_party/boringssl index 907ae62b9d8..9f897b25800 160000 --- a/third_party/boringssl +++ b/third_party/boringssl @@ -1 +1 @@ -Subproject commit 907ae62b9d81121cb86b604f83e6b811a43f7a87 +Subproject commit 9f897b25800d2f54f5c442ef01a60721aeca6d87 diff --git a/tools/run_tests/run_node.sh b/tools/run_tests/run_node.sh index b94dc3ec628..f00bd1a5af6 100755 --- a/tools/run_tests/run_node.sh +++ b/tools/run_tests/run_node.sh @@ -48,6 +48,7 @@ if [ "$CONFIG" = "gcov" ] then ./node_modules/.bin/istanbul cover --dir reports/node_coverage \ -x **/interop/* ./node_modules/.bin/_mocha -- --timeout $timeout $test_directory + cp -r reports/node_coverage/lcov-report/* reports/node_coverage/ cd build gcov Release/obj.target/grpc/ext/*.o lcov --base-directory . --directory . -c -o coverage.info @@ -55,8 +56,6 @@ then genhtml -o ../reports/node_ext_coverage --num-spaces 2 \ -t 'Node gRPC test coverage' coverage.info --rc genhtml_hi_limit=95 \ --rc genhtml_med_limit=80 --no-prefix - echo '' > \ - ../reports/node_coverage/index.html else JUNIT_REPORT_PATH=src/node/report.xml JUNIT_REPORT_STACK=1 \ ./node_modules/.bin/mocha --timeout $timeout \ From 6a3f7ad9f5d4a091b2680e82a569fbf2013ffa37 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Mon, 4 Apr 2016 10:34:29 -0700 Subject: [PATCH 2/3] Fix boringssl commit reference --- third_party/boringssl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/boringssl b/third_party/boringssl index 9f897b25800..907ae62b9d8 160000 --- a/third_party/boringssl +++ b/third_party/boringssl @@ -1 +1 @@ -Subproject commit 9f897b25800d2f54f5c442ef01a60721aeca6d87 +Subproject commit 907ae62b9d81121cb86b604f83e6b811a43f7a87 From 895c1113abe42a29f329cb4bcb9e908b36fc16b7 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Mon, 4 Apr 2016 11:27:51 -0700 Subject: [PATCH 3/3] Make ruby library conform to status code spec --- src/ruby/lib/grpc/generic/rpc_server.rb | 4 ++-- src/ruby/spec/generic/rpc_server_spec.rb | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/ruby/lib/grpc/generic/rpc_server.rb b/src/ruby/lib/grpc/generic/rpc_server.rb index 4b5578b0186..5ba77db1737 100644 --- a/src/ruby/lib/grpc/generic/rpc_server.rb +++ b/src/ruby/lib/grpc/generic/rpc_server.rb @@ -403,7 +403,7 @@ module GRPC loop_handle_server_calls end - # Sends UNAVAILABLE if there are too many unprocessed jobs + # Sends RESOURCE_EXHAUSTED if there are too many unprocessed jobs def available?(an_rpc) jobs_count, max = @pool.jobs_waiting, @max_waiting_requests GRPC.logger.info("waiting: #{jobs_count}, max: #{max}") @@ -411,7 +411,7 @@ module GRPC GRPC.logger.warn("NOT AVAILABLE: too many jobs_waiting: #{an_rpc}") noop = proc { |x| x } c = ActiveCall.new(an_rpc.call, @cq, noop, noop, an_rpc.deadline) - c.send_status(StatusCodes::UNAVAILABLE, '') + c.send_status(StatusCodes::RESOURCE_EXHAUSTED, '') nil end diff --git a/src/ruby/spec/generic/rpc_server_spec.rb b/src/ruby/spec/generic/rpc_server_spec.rb index e16ba60387e..e688057cb17 100644 --- a/src/ruby/spec/generic/rpc_server_spec.rb +++ b/src/ruby/spec/generic/rpc_server_spec.rb @@ -426,7 +426,7 @@ describe GRPC::RpcServer do threads.each(&:join) end - it 'should return UNAVAILABLE on too many jobs', server: true do + it 'should return RESOURCE_EXHAUSTED on too many jobs', server: true do opts = { a_channel_arg: 'an_arg', server_override: @server, @@ -449,7 +449,8 @@ describe GRPC::RpcServer do begin stub.an_rpc(req) rescue GRPC::BadStatus => e - one_failed_as_unavailable = e.code == StatusCodes::UNAVAILABLE + one_failed_as_unavailable = + e.code == StatusCodes::RESOURCE_EXHAUSTED end end end