diff options
author | Eric Wong <e@80x24.org> | 2016-06-05 22:48:44 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-06-05 22:48:44 +0000 |
commit | 5e211ea003d20708a221d124e139f72ded4e18b0 (patch) | |
tree | 392185e2eb42888853fc016711a19d452542e46f /test/test_wbuf.rb | |
parent | dcdeb4071ded73bcf4fd696b268bce7ee2021f5d (diff) | |
download | yahns-5e211ea003d20708a221d124e139f72ded4e18b0.tar.gz |
@busy will be reset on wbuf_write anyways, since there is no initial data and we will always attempt to write to the socket aggressively.
Diffstat (limited to 'test/test_wbuf.rb')
-rw-r--r-- | test/test_wbuf.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/test_wbuf.rb b/test/test_wbuf.rb index 1c8c0d0..990ad9d 100644 --- a/test/test_wbuf.rb +++ b/test/test_wbuf.rb @@ -20,8 +20,8 @@ class TestWbuf < Testcase buf = "*" * (16384 * 2) nr = 1000 [ true, false ].each do |persist| - wbuf = Yahns::Wbuf.new([], persist, Dir.tmpdir, :wait_writable) - assert_equal :wait_writable, wbuf.busy + wbuf = Yahns::Wbuf.new([], persist, Dir.tmpdir) + assert_equal false, wbuf.busy a, b = socketpair assert_nil wbuf.wbuf_write(a, "HIHI") assert_equal "HIHI", b.read(4) @@ -71,7 +71,7 @@ class TestWbuf < Testcase break end while true end - wbuf = Yahns::Wbuf.new([], true, Dir.tmpdir, :wait_writable) + wbuf = Yahns::Wbuf.new([], true, Dir.tmpdir) rv1 = wbuf.wbuf_write(a, buf) rv2 = wbuf.wbuf_flush(a) @@ -104,7 +104,7 @@ class TestWbuf < Testcase def test_wbuf_flush_close pipe = cloexec_pipe persist = true - wbuf = Yahns::Wbuf.new(pipe[0], persist, Dir.tmpdir, :wait_writable) + wbuf = Yahns::Wbuf.new(pipe[0], persist, Dir.tmpdir) refute wbuf.respond_to?(:close) # we don't want this for HttpResponse body sp = socketpair rv = nil |