Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
21f89071
Commit
21f89071
authored
8 years ago
by
Craig Tiller
Browse files
Options
Downloads
Plain Diff
Merge github.com:grpc/grpc into optionalize_client_config
parents
0b0147c4
2a17df28
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/ruby/lib/grpc/generic/rpc_server.rb
+2
-2
2 additions, 2 deletions
src/ruby/lib/grpc/generic/rpc_server.rb
src/ruby/spec/generic/rpc_server_spec.rb
+3
-2
3 additions, 2 deletions
src/ruby/spec/generic/rpc_server_spec.rb
tools/run_tests/run_node.sh
+1
-2
1 addition, 2 deletions
tools/run_tests/run_node.sh
with
6 additions
and
6 deletions
src/ruby/lib/grpc/generic/rpc_server.rb
+
2
−
2
View file @
21f89071
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
src/ruby/spec/generic/rpc_server_spec.rb
+
3
−
2
View file @
21f89071
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
tools/run_tests/run_node.sh
+
1
−
2
View file @
21f89071
...
...
@@ -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
'<html><head><meta http-equiv="refresh" content="0;URL=lcov-report/index.html"></head></html>'
>
\
../reports/node_coverage/index.html
else
JUNIT_REPORT_PATH
=
src/node/report.xml
JUNIT_REPORT_STACK
=
1
\
./node_modules/.bin/mocha
--timeout
$timeout
\
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment