unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
* [PATCH] Use IO#wait instead to fix test for Ruby 1.9
@ 2018-02-24  7:06 Fumiaki MATSUSHIMA
  2018-02-24  8:08 ` Eric Wong
  0 siblings, 1 reply; 3+ messages in thread
From: Fumiaki MATSUSHIMA @ 2018-02-24  7:06 UTC (permalink / raw)
  To: unicorn-public; +Cc: mtsmfm

IO#wait_readable is introduced since 2.0

I confirmed we can pass tests for all versions of Ruby with this patch.

https://github.com/mtsmfm/unicorn/pull/2
---
 test/unit/test_ccc.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/unit/test_ccc.rb b/test/unit/test_ccc.rb
index 0db0c38..3be1439 100644
--- a/test/unit/test_ccc.rb
+++ b/test/unit/test_ccc.rb
@@ -44,7 +44,7 @@ def test_ccc_tcpi
     # make sure the server is running, at least
     client = TCPSocket.new(host, port)
     client.write("GET / HTTP/1.1\r\nHost: example.com\r\n\r\n")
-    assert client.wait_readable(10), 'never got response from server'
+    assert client.wait(10), 'never got response from server'
     res = client.read
     assert_match %r{\AHTTP/1\.1 200}, res, 'got part of first response'
     assert_match %r{\r\n\r\n\z}, res, 'got end of response, server is ready'
-- 
2.14.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-02-25 11:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-24  7:06 [PATCH] Use IO#wait instead to fix test for Ruby 1.9 Fumiaki MATSUSHIMA
2018-02-24  8:08 ` Eric Wong
2018-02-25 11:34   ` Fumiaki Matsushima

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/unicorn.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).