diff options
author | 2016-11-30 08:35:52 -0800 | |
---|---|---|
committer | 2016-11-30 10:01:39 -0800 | |
commit | 174aa915bae4b379932e4887e26f2953db52b954 (patch) | |
tree | 2ca63f0c207da3f2f3832533b020a33d75a6f21c /src/ruby/pb/test | |
parent | acacd0d6467109e452e7375f662240c26fca004f (diff) |
change client code to use specific exceptions and throw bad status if
unkown code
Diffstat (limited to 'src/ruby/pb/test')
-rwxr-xr-x | src/ruby/pb/test/client.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/ruby/pb/test/client.rb b/src/ruby/pb/test/client.rb index b9af160e7a..9ee5cdf9fd 100755 --- a/src/ruby/pb/test/client.rb +++ b/src/ruby/pb/test/client.rb @@ -338,11 +338,8 @@ class NamedTests deadline = GRPC::Core::TimeConsts::from_relative_time(1) resps = @stub.full_duplex_call(enum.each_item, deadline: deadline) resps.each { } # wait to receive each request (or timeout) - fail 'Should have raised GRPC::BadStatus(DEADLINE_EXCEEDED)' - rescue GRPC::BadStatus => e - assert("#{__callee__}: status was wrong") do - e.code == GRPC::Core::StatusCodes::DEADLINE_EXCEEDED - end + fail 'Should have raised GRPC::DeadlineExceeded' + rescue GRPC::DeadlineExceeded end def empty_stream |