* [PATCH] test_watcher: fix for Ruby trunk r40195 and later
@ 2013-09-02 10:29 Eric Wong
0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2013-09-02 10:29 UTC (permalink / raw)
To: raindrops
assert_raises doesn't capture exceptions the same way rescue works.
---
test/test_watcher.rb | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/test/test_watcher.rb b/test/test_watcher.rb
index 5e45dcd..70e8e75 100644
--- a/test/test_watcher.rb
+++ b/test/test_watcher.rb
@@ -154,7 +154,12 @@ class TestWatcher < Test::Unit::TestCase
assert_equal before, headers["X-Last-Peak-At"], headers.inspect
@ios << @srv.accept
- assert_raises(Errno::EAGAIN) { @srv.accept_nonblock }
+ begin
+ @srv.accept_nonblock
+ assert false, "we should not get here"
+ rescue => e
+ assert_kind_of Errno::EAGAIN, e
+ end
sleep 0.1
env = @req.class.env_for "/queued/#@addr.txt"
status, headers, body = @app.call(env.dup)
--
Eric Wong
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-09-02 10:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-02 10:29 [PATCH] test_watcher: fix for Ruby trunk r40195 and later Eric Wong
raindrops RubyGem user+dev discussion/patches/pulls/bugs/help
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://yhbt.net/raindrops-public
git clone --mirror http://ou63pmih66umazou.onion/raindrops-public
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V1 raindrops-public raindrops-public/ https://yhbt.net/raindrops-public \
raindrops-public@yhbt.net raindrops-public@bogomips.org raindrops@librelist.org raindrops@librelist.com
public-inbox-index raindrops-public
Example config snippet for mirrors.
Newsgroups are available over NNTP:
nntp://news.public-inbox.org/inbox.comp.lang.ruby.raindrops
nntp://ou63pmih66umazou.onion/inbox.comp.lang.ruby.raindrops
note: .onion URLs require Tor: https://www.torproject.org/
code repositories for the project(s) associated with this inbox:
../../../raindrops.git
AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git