Welcome to the "trac"-ing site of soap4r!
[soap4r] [httpclient] [openpgp4u] [pkcs1] [logger] [csv] [vtr]

Changeset 1017

Show
Ignore:
Timestamp:
10/21/03 00:32:19 (5 years ago)
Author:
nahi
Message:

Catch thread exception and terminate the test.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/test/soap/calc/test_calc.rb

    r1016 r1017  
    2323    while @server.server.nil? or @server.server.status != :Running 
    2424      sleep 0.1 
     25      unless @t.alive? 
     26        @t.join 
     27        raise 
     28      end 
    2529    end 
    2630    @calc = SOAP::RPC::Driver.new("http://localhost:#{Port}/", 'http://tempuri.org/calcService') 
     
    3438    @server.server.shutdown 
    3539    @t.kill 
     40    @t.join 
    3641  end 
    3742 
  • trunk/test/soap/calc/test_calc2.rb

    r1016 r1017  
    1919    @server.level = Logger::Severity::FATAL 
    2020    @t = Thread.new { 
     21      Thread.current.abort_on_exception = true 
    2122      @server.start 
    2223    } 
    2324    while @server.server.nil? or @server.server.status != :Running 
    2425      sleep 0.1 
     26      unless @t.alive? 
     27        @t.join 
     28        raise 
     29      end 
    2530    end 
    2631    @var = SOAP::RPC::Driver.new("http://localhost:#{Port}/", 'http://tempuri.org/calcService') 
     
    3641    @server.server.shutdown 
    3742    @t.kill 
     43    @t.join 
    3844  end 
    3945 
  • trunk/test/soap/calc/test_calc_cgi.rb

    r1016 r1017  
    2222    logger = Logger.new(STDERR) 
    2323    logger.level = Logger::Severity::FATAL 
     24    logger.level = Logger::Severity::DEBUG if $DEBUG 
    2425    @server = WEBrick::HTTPServer.new( 
    2526      :BindAddress => "0.0.0.0", 
     
    3233    ) 
    3334    @t = Thread.new { 
     35      Thread.current.abort_on_exception = true 
    3436      @server.start 
    3537    } 
    3638    while @server.status != :Running 
    3739      sleep 0.1 
     40      unless @t.alive? 
     41        @t.join 
     42        raise 
     43      end 
    3844    end 
    3945    @calc = SOAP::RPC::Driver.new("http://localhost:#{Port}/server.cgi", 'http://tempuri.org/calcService') 
     
    4753    @server.shutdown 
    4854    @t.kill 
     55    @t.join 
    4956  end 
    5057 
  • trunk/test/soap/helloworld/test_helloworld.rb

    r1016 r1017  
    1919    @server.level = Logger::Severity::UNKNOWN 
    2020    @t = Thread.new { 
     21      Thread.current.abort_on_exception = true 
    2122      @server.start 
    2223    } 
    2324    while @server.server.nil? or @server.server.status != :Running 
    2425      sleep 0.1 
     26      unless @t.alive? 
     27        @t.join 
     28        raise 
     29      end 
    2530    end 
    2631    @client = SOAP::RPC::Driver.new("http://localhost:#{Port}/", 'urn:hws') 
     
    3136    @server.server.shutdown 
    3237    @t.kill 
     38    @t.join 
    3339  end 
    3440