From 8c5c5a221f3bd3b0bdf6304b924630c35c7f8631 Mon Sep 17 00:00:00 2001 From: drbrain Date: Wed, 11 Apr 2012 20:28:11 +0000 Subject: * lib/webrick/server.rb (module WEBrick::GenericServer): A server will now continue only when a StandardError subclass is raised. For other exception types the error will be logged at the fatal level and the server will safely stop. Based on a patch by Alex Young. [ruby-trunk - Feature #6236] * test/webrick/test_server.rb: Test for new exception handling behavior. Join the server thread instead of busy-waiting for it to shut down to remove race conditions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/webrick/utils.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'test/webrick/utils.rb') diff --git a/test/webrick/utils.rb b/test/webrick/utils.rb index ef4654cafd..15852ca47d 100644 --- a/test/webrick/utils.rb +++ b/test/webrick/utils.rb @@ -36,14 +36,13 @@ module TestWEBrick :AccessLog => [[logger, ""]] }.update(config)) begin - server.start + server_thread = server.start addr = server.listeners[0].addr block.yield([server, addr[3], addr[1], log]) ensure server.shutdown - until server.status == :Stop - sleep 0.1 - end + + server_thread.join end log_string end -- cgit v1.2.3