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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
a80aa7d8
You need to sign in or sign up before continuing.
Commit
a80aa7d8
authored
Apr 17, 2015
by
Tim Emiola
Browse files
Options
Downloads
Patches
Plain Diff
clarify test descriptions
parent
9a0ae038
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/ruby/spec/generic/rpc_server_spec.rb
+4
-15
4 additions, 15 deletions
src/ruby/spec/generic/rpc_server_spec.rb
with
4 additions
and
15 deletions
src/ruby/spec/generic/rpc_server_spec.rb
+
4
−
15
View file @
a80aa7d8
...
@@ -536,7 +536,7 @@ describe GRPC::RpcServer do
...
@@ -536,7 +536,7 @@ describe GRPC::RpcServer do
end
end
end
end
context
'with
returned
metadata
on failing
'
do
context
'with
trailing
metadata'
do
before
(
:each
)
do
before
(
:each
)
do
server_opts
=
{
server_opts
=
{
server_override:
@server
,
server_override:
@server
,
...
@@ -546,7 +546,7 @@ describe GRPC::RpcServer do
...
@@ -546,7 +546,7 @@ describe GRPC::RpcServer do
@srv
=
RpcServer
.
new
(
**
server_opts
)
@srv
=
RpcServer
.
new
(
**
server_opts
)
end
end
it
'should
receive the metadata in the BadStatus
'
,
server:
true
do
it
'should
be added to BadStatus when requests fail
'
,
server:
true
do
service
=
FailingService
.
new
service
=
FailingService
.
new
@srv
.
handle
(
service
)
@srv
.
handle
(
service
)
t
=
Thread
.
new
{
@srv
.
run
}
t
=
Thread
.
new
{
@srv
.
run
}
...
@@ -558,7 +558,7 @@ describe GRPC::RpcServer do
...
@@ -558,7 +558,7 @@ describe GRPC::RpcServer do
# confirm it raise the expected error
# confirm it raise the expected error
expect
(
&
blk
).
to
raise_error
GRPC
::
BadStatus
expect
(
&
blk
).
to
raise_error
GRPC
::
BadStatus
# call again and confirm exception
has the expected fields
# call again and confirm exception
contained the trailing metadata.
begin
begin
blk
.
call
blk
.
call
rescue
GRPC
::
BadStatus
=>
e
rescue
GRPC
::
BadStatus
=>
e
...
@@ -569,19 +569,8 @@ describe GRPC::RpcServer do
...
@@ -569,19 +569,8 @@ describe GRPC::RpcServer do
@srv
.
stop
@srv
.
stop
t
.
join
t
.
join
end
end
end
context
'with returned metadata on passing'
do
it
'should be received by the client'
,
server:
true
do
before
(
:each
)
do
server_opts
=
{
server_override:
@server
,
completion_queue_override:
@server_queue
,
poll_period:
1
}
@srv
=
RpcServer
.
new
(
**
server_opts
)
end
it
'should send connect metadata to the client'
,
server:
true
do
wanted_trailers
=
{
'k1'
=>
'out_v1'
,
'k2'
=>
'out_v2'
}
wanted_trailers
=
{
'k1'
=>
'out_v1'
,
'k2'
=>
'out_v2'
}
service
=
EchoService
.
new
(
k1:
'out_v1'
,
k2:
'out_v2'
)
service
=
EchoService
.
new
(
k1:
'out_v1'
,
k2:
'out_v2'
)
@srv
.
handle
(
service
)
@srv
.
handle
(
service
)
...
...
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
sign in
to comment