aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2016-12-05 00:38:13 +0900
committerKazuki Yamaguchi <k@rhe.jp>2016-12-05 00:38:13 +0900
commitfdf417d72304474809ff138726ce829a52b8c896 (patch)
treeb5635cd1662fed9c79494d6d5b086468285233f8 /test
parent3fdff8fdaf0391bf6ba674ef6830ac498323b0f4 (diff)
downloadruby-openssl-fdf417d72304474809ff138726ce829a52b8c896.tar.gz
test/test_pair: make TestPairM#test_write_nonblock_retry faster
Write 4099-bytes blocks instead of 11-bytes blocks to run it faster. The buffer may be as large as megabytes and it takes too much time to fill up, especially under GC.stress. I didn't measured but it didn't finish in an hour.
Diffstat (limited to 'test')
-rw-r--r--test/test_pair.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/test_pair.rb b/test/test_pair.rb
index ad65327d..9a5205f8 100644
--- a/test/test_pair.rb
+++ b/test/test_pair.rb
@@ -295,7 +295,7 @@ module OpenSSL::TestPairM
# fill up a socket so we hit EAGAIN
written = String.new
n = 0
- buf = 'a' * 11
+ buf = 'a' * 4099
case ret = s1.write_nonblock(buf, exception: false)
when :wait_readable then break
when :wait_writable then break