mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Suppress warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fcdec9bfbb
commit
49aac86510
1 changed files with 21 additions and 21 deletions
|
@ -175,37 +175,36 @@ class OpenSSL::TestSSL < OpenSSL::SSLTestCase
|
|||
end
|
||||
|
||||
def test_read_nonblock_without_session
|
||||
OpenSSL::TestUtils.silent do
|
||||
start_server(PORT, OpenSSL::SSL::VERIFY_NONE, false){|server, port|
|
||||
sock = TCPSocket.new("127.0.0.1", port)
|
||||
ssl = OpenSSL::SSL::SSLSocket.new(sock)
|
||||
ssl.sync_close = true
|
||||
|
||||
OpenSSL::TestUtils.silent do
|
||||
assert_equal :wait_readable, ssl.read_nonblock(100, exception: false)
|
||||
ssl.write("abc\n")
|
||||
IO.select [ssl]
|
||||
assert_equal('a', ssl.read_nonblock(1))
|
||||
assert_equal("bc\n", ssl.read_nonblock(100))
|
||||
assert_equal :wait_readable, ssl.read_nonblock(100, exception: false)
|
||||
end
|
||||
ssl.close
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
def test_starttls
|
||||
OpenSSL::TestUtils.silent do
|
||||
start_server(PORT, OpenSSL::SSL::VERIFY_NONE, false){|server, port|
|
||||
sock = TCPSocket.new("127.0.0.1", port)
|
||||
ssl = OpenSSL::SSL::SSLSocket.new(sock)
|
||||
ssl.sync_close = true
|
||||
str = "x" * 1000 + "\n"
|
||||
|
||||
OpenSSL::TestUtils.silent do
|
||||
ITERATIONS.times{
|
||||
ssl.puts(str)
|
||||
assert_equal(str, ssl.gets)
|
||||
}
|
||||
starttls(ssl)
|
||||
end
|
||||
|
||||
ITERATIONS.times{
|
||||
ssl.puts(str)
|
||||
|
@ -215,6 +214,7 @@ class OpenSSL::TestSSL < OpenSSL::SSLTestCase
|
|||
ssl.close
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
def test_parallel
|
||||
GC.start
|
||||
|
|
Loading…
Reference in a new issue