diff options
author | nahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-10-20 15:37:11 +0000 |
---|---|---|
committer | nahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-10-20 15:37:11 +0000 |
commit | 208ff30c076d16db2e2b6fc3f0d635b3197e7ca4 (patch) | |
tree | 46e1de4572b9522f746270d901f0e3cefeda1bff /test/soap/calc/test_calc_cgi.rb | |
parent | bc867112ecb2ce355caf98c3627d50a7d0b60f3d (diff) | |
download | ruby-208ff30c076d16db2e2b6fc3f0d635b3197e7ca4.tar.gz |
* test/soap/calc/*, test/soap/helloworld/*: catch the exception from test
server thread and recover.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/soap/calc/test_calc_cgi.rb')
-rw-r--r-- | test/soap/calc/test_calc_cgi.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/soap/calc/test_calc_cgi.rb b/test/soap/calc/test_calc_cgi.rb index 0ed5849283..30cafae446 100644 --- a/test/soap/calc/test_calc_cgi.rb +++ b/test/soap/calc/test_calc_cgi.rb @@ -21,6 +21,7 @@ class TestCalcCGI < Test::Unit::TestCase def setup logger = Logger.new(STDERR) logger.level = Logger::Severity::FATAL + logger.level = Logger::Severity::DEBUG if $DEBUG @server = WEBrick::HTTPServer.new( :BindAddress => "0.0.0.0", :Logger => logger, @@ -31,10 +32,15 @@ class TestCalcCGI < Test::Unit::TestCase :CGIInterpreter => RUBYBIN ) @t = Thread.new { + Thread.current.abort_on_exception = true @server.start } while @server.status != :Running sleep 0.1 + unless @t.alive? + @t.join + raise + end end @calc = SOAP::RPC::Driver.new("http://localhost:#{Port}/server.cgi", 'http://tempuri.org/calcService') @calc.add_method('add', 'lhs', 'rhs') @@ -46,6 +52,7 @@ class TestCalcCGI < Test::Unit::TestCase def teardown @server.shutdown @t.kill + @t.join end def test_calc |