Skip to content

Commit

Permalink
test/test_pair: make TestPairM#test_write_nonblock_retry faster
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rhenium committed Dec 4, 2016
1 parent 3fdff8f commit fdf417d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/test_pair.rb
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ def test_write_nonblock_retry
# 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
Expand Down

0 comments on commit fdf417d

Please sign in to comment.