mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
bc867112ec
commit
208ff30c07
5 changed files with 29 additions and 0 deletions
|
@ -18,10 +18,15 @@ class TestHelloWorld < Test::Unit::TestCase
|
|||
@server = HelloWorldServer.new('hws', 'urn:hws', '0.0.0.0', Port)
|
||||
@server.level = Logger::Severity::UNKNOWN
|
||||
@t = Thread.new {
|
||||
Thread.current.abort_on_exception = true
|
||||
@server.start
|
||||
}
|
||||
while @server.server.nil? or @server.server.status != :Running
|
||||
sleep 0.1
|
||||
unless @t.alive?
|
||||
@t.join
|
||||
raise
|
||||
end
|
||||
end
|
||||
@client = SOAP::RPC::Driver.new("http://localhost:#{Port}/", 'urn:hws')
|
||||
@client.add_method("hello_world", "from")
|
||||
|
@ -30,6 +35,7 @@ class TestHelloWorld < Test::Unit::TestCase
|
|||
def teardown
|
||||
@server.server.shutdown
|
||||
@t.kill
|
||||
@t.join
|
||||
end
|
||||
|
||||
def test_hello_world
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue