diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2016-10-24 14:12:07 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2016-10-24 15:29:52 +0900 |
commit | f542fb60add7a7f9f57bd7097a5e61dc3e5e0a99 (patch) | |
tree | a349bf784b1f7b2821bccf82cc82fc96285dc535 /test | |
parent | 5c31e7233476bec184cac239b5d36de68dbd997e (diff) | |
download | ruby-openssl-f542fb60add7a7f9f57bd7097a5e61dc3e5e0a99.tar.gz |
test/test_pair: revert workaround added by r42790
It was added as a workaround for "bad write retry" error that occurs
when SSLSocket#write_nonblock is retried with a different String. This
is now fixed by r54466 ("openssl: accept moving write buffer for
write_nonblock", 2016-03-31).
Diffstat (limited to 'test')
-rw-r--r-- | test/test_pair.rb | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/test/test_pair.rb b/test/test_pair.rb index 7d962c38..5fbb77e7 100644 --- a/test/test_pair.rb +++ b/test/test_pair.rb @@ -259,18 +259,12 @@ module OpenSSL::TestPairM def test_write_nonblock_no_exceptions ssl_pair {|s1, s2| n = 0 - begin - n += write_nonblock_no_ex s1, "a" * 100000 - n += write_nonblock_no_ex s1, "b" * 100000 - n += write_nonblock_no_ex s1, "c" * 100000 - n += write_nonblock_no_ex s1, "d" * 100000 - n += write_nonblock_no_ex s1, "e" * 100000 - n += write_nonblock_no_ex s1, "f" * 100000 - rescue OpenSSL::SSL::SSLError => e - # on some platforms (maybe depend on OpenSSL version), writing to - # SSLSocket after SSL_ERROR_WANT_WRITE causes this error. - raise e if n == 0 - end + n += write_nonblock_no_ex s1, "a" * 100000 + n += write_nonblock_no_ex s1, "b" * 100000 + n += write_nonblock_no_ex s1, "c" * 100000 + n += write_nonblock_no_ex s1, "d" * 100000 + n += write_nonblock_no_ex s1, "e" * 100000 + n += write_nonblock_no_ex s1, "f" * 100000 s1.close assert_equal(n, s2.read.length) } |