diff --git a/src/ruby/pb/test/client.rb b/src/ruby/pb/test/client.rb index feedcde7a50c89c4933ab43d7f8cfea09238160c..b6695482a286e8626080e505c1b793bfd9bcef3f 100755 --- a/src/ruby/pb/test/client.rb +++ b/src/ruby/pb/test/client.rb @@ -317,7 +317,8 @@ class NamedTests def timeout_on_sleeping_server msg_sizes = [[27_182, 31_415]] ppp = PingPongPlayer.new(msg_sizes) - resps = @stub.full_duplex_call(ppp.each_item, timeout: 0.001) + deadline = GRPC::Core::TimeConsts::from_relative_time(0.001) + resps = @stub.full_duplex_call(ppp.each_item, deadline: deadline) resps.each { |r| ppp.queue.push(r) } fail 'Should have raised GRPC::BadStatus(DEADLINE_EXCEEDED)' rescue GRPC::BadStatus => e