summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-02-13 00:56:40 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-02-13 00:56:40 +0000
commitc84e52921968ddcca88ad58ab2d8bdc69c3e45ab (patch)
tree739eee7a938d92aa01f969c1295b8fefb7e4a8d2
parent00e84afa3343d277129d452c3b0b455fe2c71c38 (diff)
* test/xmlrpc/webrick_testing.rb (WEBrick_Testing#start_server):
catch IOError when server socket was closed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--test/xmlrpc/webrick_testing.rb9
2 files changed, 12 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 6e945553b9..9fd18059ca 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sun Feb 13 09:56:32 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * test/xmlrpc/webrick_testing.rb (WEBrick_Testing#start_server):
+ catch IOError when server socket was closed.
+
Sun Feb 13 07:39:51 2011 Yukihiro Matsumoto <matz@ruby-lang.org>
* enum.c (enum_inject): typo fixed. a patch from Gaku Ueda in
diff --git a/test/xmlrpc/webrick_testing.rb b/test/xmlrpc/webrick_testing.rb
index 4c0cf89f1a..f112836a6a 100644
--- a/test/xmlrpc/webrick_testing.rb
+++ b/test/xmlrpc/webrick_testing.rb
@@ -18,8 +18,13 @@ module WEBrick_Testing
:StartCallback => proc { @__started = true }
}.update(config))
yield @__server
- @__server.start
- @__started = false
+ begin
+ @__server.start
+ rescue IOError => e
+ assert_match(/closed/, e.message)
+ ensure
+ @__started = false
+ end
}
Timeout.timeout(5) {