Remove warnings about Object#timeout

This commit is contained in:
Patrick J Cherry
2018-02-02 20:46:46 +00:00
parent 9eb7072f49
commit 051576df6d

View File

@@ -114,7 +114,7 @@ module ProxyTests
sc2.write_data( b * 4096 ) sc2.write_data( b * 4096 )
# Check it to make sure it's correct # Check it to make sure it's correct
rsp = timeout(15) { client.read_response } rsp = Timeout.timeout(15) { client.read_response }
assert_equal ::FlexNBD::REPLY_MAGIC, rsp[:magic] assert_equal ::FlexNBD::REPLY_MAGIC, rsp[:magic]
assert_equal 0, rsp[:error] assert_equal 0, rsp[:error]
assert_equal req1[:handle], rsp[:handle] assert_equal req1[:handle], rsp[:handle]
@@ -163,7 +163,7 @@ module ProxyTests
sc2.write_reply( req2[:handle] ) sc2.write_reply( req2[:handle] )
# Check it to make sure it's correct # Check it to make sure it's correct
rsp = timeout(15) { client.read_response } rsp = Timeout.timeout(15) { client.read_response }
assert_equal ::FlexNBD::REPLY_MAGIC, rsp[:magic] assert_equal ::FlexNBD::REPLY_MAGIC, rsp[:magic]
assert_equal 0, rsp[:error] assert_equal 0, rsp[:error]
assert_equal req1[:handle], rsp[:handle] assert_equal req1[:handle], rsp[:handle]
@@ -178,7 +178,7 @@ module ProxyTests
c2 = nil c2 = nil
assert_raises(Timeout::Error) do assert_raises(Timeout::Error) do
timeout(1) do Timeout.timeout(1) do
c2 = FlexNBD::FakeSource.new(@env.ip, @env.port2, "Couldn't connect to proxy (2)") c2 = FlexNBD::FakeSource.new(@env.ip, @env.port2, "Couldn't connect to proxy (2)")
c2.read_hello c2.read_hello
end end