summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2015-09-28 21:55:35 +0900
committerKazuki Yamaguchi <k@rhe.jp>2015-09-28 21:55:35 +0900
commit9ddea2e32a38ecefc1b6985adee30a8e602c79f3 (patch)
tree6da5fad7655385eebaf0c3897b45e3bf4fbbd209
parent53c3791ae6ce6f4c7c9e2ef7148ad5bb25976a5f (diff)
downloadplum-9ddea2e32a38ecefc1b6985adee30a8e602c79f3.tar.gz
test: Object#timeout will be deprecated in Ruby 2.3.0
-rw-r--r--test/plum/test_https_connection.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/plum/test_https_connection.rb b/test/plum/test_https_connection.rb
index d8c3789..34679bc 100644
--- a/test/plum/test_https_connection.rb
+++ b/test/plum/test_https_connection.rb
@@ -47,7 +47,7 @@ class HTTPSConnectionNegotiationTest < Minitest::Test
server_thread = Thread.new {
begin
- timeout(3) {
+ Timeout.timeout(3) {
sock = ssl_server.accept
plum = HTTPSConnection.new(sock)
assert_connection_error(:inadequate_security) {
@@ -55,7 +55,7 @@ class HTTPSConnectionNegotiationTest < Minitest::Test
plum.run
}
}
- rescue TimeoutError
+ rescue Timeout::Error
flunk "server timeout"
ensure
tcp_server.close
@@ -64,7 +64,7 @@ class HTTPSConnectionNegotiationTest < Minitest::Test
client_thread = Thread.new {
sock = TCPSocket.new("127.0.0.1", LISTEN_PORT)
begin
- timeout(3) {
+ Timeout.timeout(3) {
ctx = OpenSSL::SSL::SSLContext.new.tap {|ctx|
ctx.alpn_protocols = ["h2"]
ctx.ciphers = "AES256-GCM-SHA384"
@@ -74,7 +74,7 @@ class HTTPSConnectionNegotiationTest < Minitest::Test
ssl.write Connection::CLIENT_CONNECTION_PREFACE
ssl.write Frame.settings.assemble
}
- rescue TimeoutError
+ rescue Timeout::Error
flunk "client timeout"
ensure
sock.close