test/test_wbuf.rb in yahns-1.2.0 vs test/test_wbuf.rb in yahns-1.3.0
- old
+ new
@@ -13,10 +13,11 @@
def socketpair
KgioUS.pair.each { |io| io.close_on_exec = true }
end
def test_wbuf
+ skip "sendfile not Linux-compatible" if RUBY_PLATFORM !~ /linux/
buf = "*" * (16384 * 2)
nr = 1000
[ true, false ].each do |persist|
wbuf = Yahns::Wbuf.new([], persist, Dir.tmpdir)
a, b = socketpair
@@ -57,9 +58,10 @@
end
end
def test_wbuf_blocked
a, b = socketpair
+ skip "sendfile not Linux-compatible" if RUBY_PLATFORM !~ /linux/
buf = "." * 4096
4.times do
begin
a.write_nonblock(buf)
rescue Errno::EAGAIN