diff options
author | Eric Wong <e@80x24.org> | 2015-04-03 00:13:25 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2015-04-03 00:14:33 +0000 |
commit | 392b42c68b2a2e4c5beb60f59048b4813dae7c35 (patch) | |
tree | e88cd3fa666525fc8869679dce8335972d3bc9e2 /test/test_wbuf.rb | |
parent | adbf9a03518a94932e951c231852dffc63671432 (diff) | |
download | yahns-392b42c68b2a2e4c5beb60f59048b4813dae7c35.tar.gz |
This should make it easier to track state for asynchronous proxy_pass buffering.
Diffstat (limited to 'test/test_wbuf.rb')
-rw-r--r-- | test/test_wbuf.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/test_wbuf.rb b/test/test_wbuf.rb index bfdfa2b..e6f8790 100644 --- a/test/test_wbuf.rb +++ b/test/test_wbuf.rb @@ -19,7 +19,8 @@ class TestWbuf < Testcase buf = "*" * (16384 * 2) nr = 1000 [ true, false ].each do |persist| - wbuf = Yahns::Wbuf.new([], persist, Dir.tmpdir) + wbuf = Yahns::Wbuf.new([], persist, Dir.tmpdir, :wait_writable) + assert_equal :wait_writable, wbuf.busy a, b = socketpair assert_nil wbuf.wbuf_write(a, "HIHI") assert_equal "HIHI", b.read(4) @@ -69,7 +70,7 @@ class TestWbuf < Testcase break end while true end - wbuf = Yahns::Wbuf.new([], true, Dir.tmpdir) + wbuf = Yahns::Wbuf.new([], true, Dir.tmpdir, :wait_writable) assert_equal :wait_writable, wbuf.wbuf_write(a, buf) assert_equal :wait_writable, wbuf.wbuf_flush(a) @@ -93,7 +94,7 @@ class TestWbuf < Testcase def test_wbuf_flush_close pipe = cloexec_pipe persist = true - wbuf = Yahns::Wbuf.new(pipe[0], persist, Dir.tmpdir) + wbuf = Yahns::Wbuf.new(pipe[0], persist, Dir.tmpdir, :wait_writable) refute wbuf.respond_to?(:close) # we don't want this for HttpResponse body sp = socketpair rv = nil |