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
a2f0e197
Commit
a2f0e197
authored
7 years ago
by
apolcyn
Committed by
GitHub
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #11913 from apolcyn/debug_new_ruby_flake
Fix ruby test flake
parents
a0741336
11fade7c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/ruby/spec/generic/client_stub_spec.rb
+22
-1
22 additions, 1 deletion
src/ruby/spec/generic/client_stub_spec.rb
with
22 additions
and
1 deletion
src/ruby/spec/generic/client_stub_spec.rb
+
22
−
1
View file @
a2f0e197
...
@@ -451,10 +451,31 @@ describe 'ClientStub' do
...
@@ -451,10 +451,31 @@ describe 'ClientStub' do
/Header values must be of type string or array/
)
/Header values must be of type string or array/
)
end
end
def
run_server_streamer_against_client_with_unmarshal_error
(
expected_input
,
replys
)
wakey_thread
do
|
notifier
|
c
=
expect_server_to_be_invoked
(
notifier
)
expect
(
c
.
remote_read
).
to
eq
(
expected_input
)
begin
replys
.
each
{
|
r
|
c
.
remote_send
(
r
)
}
rescue
GRPC
::
Core
::
CallError
# An attempt to write to the client might fail. This is ok
# because the client call is expected to fail when
# unmarshalling the first response, and to cancel the call,
# and there is a race as for when the server-side call will
# start to fail.
p
'remote_send failed (allowed because call expected to cancel)'
ensure
c
.
send_status
(
OK
,
'OK'
,
true
)
end
end
end
it
'the call terminates when there is an unmarshalling error'
do
it
'the call terminates when there is an unmarshalling error'
do
server_port
=
create_test_server
server_port
=
create_test_server
host
=
"localhost:
#{
server_port
}
"
host
=
"localhost:
#{
server_port
}
"
th
=
run_server_streamer
(
@sent_msg
,
@replys
,
@pass
)
th
=
run_server_streamer_against_client_with_unmarshal_error
(
@sent_msg
,
@replys
)
stub
=
GRPC
::
ClientStub
.
new
(
host
,
:this_channel_is_insecure
)
stub
=
GRPC
::
ClientStub
.
new
(
host
,
:this_channel_is_insecure
)
unmarshal
=
proc
{
fail
(
ArgumentError
,
'test unmarshalling error'
)
}
unmarshal
=
proc
{
fail
(
ArgumentError
,
'test unmarshalling error'
)
}
...
...
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