summaryrefslogtreecommitdiff
path: root/test/webrick/test_server.rb
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-04-14 02:30:43 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-04-14 02:30:43 +0000
commitc26ea74ad670be16cab2f38ec557d1d0505e5d39 (patch)
treeb4e4dfd532904e002c3dd4e3538e2d8cd53e902f /test/webrick/test_server.rb
parente95f7ea80d096cf27ea0ae5f7dc712ad72e71f3c (diff)
* lib/webrick/server.rb (WEBrick::GenericServer#start):
partially revert r35315. * test/webrick/test_server.rb (test_start_exception): received signal is delivered to the main thread, so it is needed to emulate it. patched by Eric Hodel. [ruby-core:44348] [Feature #6236] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/webrick/test_server.rb')
-rw-r--r--test/webrick/test_server.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/webrick/test_server.rb b/test/webrick/test_server.rb
index 86fccac..eb13994 100644
--- a/test/webrick/test_server.rb
+++ b/test/webrick/test_server.rb
@@ -29,12 +29,12 @@ class TestWEBrickServer < Test::Unit::TestCase
:StopCallback => Proc.new{ stopped += 1 },
}
- e = assert_raises(Interrupt) do
+ e = assert_raises(SignalException) do
TestWEBrick.start_server(Echo, config) { |server, addr, port, log|
listener = server.listeners.first
def listener.accept
- Process.kill(:INT, $$) # simulate ^C
+ raise SignalException, 'SIGTERM' # simulate signal in main thread
end
Thread.pass while server.status != :Running