* test/openssl/test_ssl.rb (test_multibyte_read_write): start server
for each length to avoid race condition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b574a4d4a1
commit
df8126f9e3
@ -1,3 +1,8 @@
|
|||||||
|
Sat Oct 22 19:48:50 2011 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
|
* test/openssl/test_ssl.rb (test_multibyte_read_write): start server
|
||||||
|
for each length to avoid race condition.
|
||||||
|
|
||||||
Sat Oct 22 18:49:24 2011 Tanaka Akira <akr@fsij.org>
|
Sat Oct 22 18:49:24 2011 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* include/ruby/intern.h (rb_fd_set_cloexec): declared.
|
* include/ruby/intern.h (rb_fd_set_cloexec): declared.
|
||||||
|
@ -400,9 +400,9 @@ class OpenSSL::TestSSL < OpenSSL::SSLTestCase
|
|||||||
auml = [%w{ C3 A4 }.join('')].pack('H*')
|
auml = [%w{ C3 A4 }.join('')].pack('H*')
|
||||||
auml.force_encoding(Encoding::UTF_8)
|
auml.force_encoding(Encoding::UTF_8)
|
||||||
|
|
||||||
|
[10, 1000, 100000].each {|i|
|
||||||
str = nil
|
str = nil
|
||||||
num_written = nil
|
num_written = nil
|
||||||
|
|
||||||
server_proc = Proc.new {|ctx, ssl|
|
server_proc = Proc.new {|ctx, ssl|
|
||||||
cmp = ssl.read
|
cmp = ssl.read
|
||||||
raw_size = cmp.size
|
raw_size = cmp.size
|
||||||
@ -411,9 +411,7 @@ class OpenSSL::TestSSL < OpenSSL::SSLTestCase
|
|||||||
assert_equal(num_written, raw_size)
|
assert_equal(num_written, raw_size)
|
||||||
ssl.close
|
ssl.close
|
||||||
}
|
}
|
||||||
|
|
||||||
start_server(PORT, OpenSSL::SSL::VERIFY_NONE, true, :server_proc => server_proc){|server, port|
|
start_server(PORT, OpenSSL::SSL::VERIFY_NONE, true, :server_proc => server_proc){|server, port|
|
||||||
[10, 1000, 100000].each {|i|
|
|
||||||
sock = TCPSocket.new("127.0.0.1", port)
|
sock = TCPSocket.new("127.0.0.1", port)
|
||||||
ssl = OpenSSL::SSL::SSLSocket.new(sock)
|
ssl = OpenSSL::SSL::SSLSocket.new(sock)
|
||||||
ssl.sync_close = true
|
ssl.sync_close = true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user