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

Changeset 1016

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

* change port# of tests.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/test/interopR2/server.rb

    r952 r1016  
    44 
    55#$KCODE = "UTF8"      # Set $KCODE before loading 'soap/xmlparser'. 
    6 #$KCODE = "EUC" 
    7 $KCODE = "SJIS" 
     6$KCODE = "EUC" 
     7#$KCODE = "SJIS" 
    88 
    99require 'soap/rpc/standaloneServer' 
     
    268268end 
    269269 
    270 GC.start 
    271 InteropApp.new('InteropApp', InterfaceNS, '0.0.0.0', 10080).start 
     270if __FILE__ == $0 
     271  InteropApp.new('InteropApp', InterfaceNS, '0.0.0.0', 10080).start 
     272end 
  • trunk/test/runner.rb

    r999 r1016  
    1 require 'test/unit/testsuite' 
    2 require 'test/unit/testcase' 
    3 require 'optparse' 
     1require 'test/unit' 
    42 
    5 rcsid = %w$Id: runner.rb,v 1.3 2003/10/04 08:42:13 nahi Exp $ 
     3rcsid = %w$Id: runner.rb,v 1.4 2003/10/18 15:10:29 nahi Exp $ 
    64Version = rcsid[2].scan(/\d+/).collect!(&method(:Integer)).freeze 
    75Release = rcsid[3].freeze 
    86 
    9 class BulkTestSuite < Test::Unit::TestSuite 
    10   def self.suite 
    11     suite = Test::Unit::TestSuite.new(self.name) 
    12     ObjectSpace.each_object(Class) do |klass| 
    13       suite << klass.suite if (Test::Unit::TestCase > klass) 
    14     end 
    15     suite 
    16   end 
    17 end 
    18  
    19 runners_map = { 
    20   'console' => proc do |suite| 
    21     require 'test/unit/ui/console/testrunner' 
    22     passed = Test::Unit::UI::Console::TestRunner.run(suite).passed? 
    23     exit(passed ? 0 : 1) 
    24   end, 
    25   'gtk' => proc do |suite| 
    26     require 'test/unit/ui/gtk/testrunner' 
    27     Test::Unit::UI::GTK::TestRunner.run(suite) 
    28   end, 
    29   'fox' => proc do |suite| 
    30     require 'test/unit/ui/fox/testrunner' 
    31     Test::Unit::UI::Fox::TestRunner.run(suite) 
    32   end, 
    33 
    34  
    35 runner = 'console' 
    36 opt = OptionParser.new 
    37 opt.program_name = $0 
    38 opt.banner << " [tests...]" 
    39 opt.on("--runner=mode", runners_map.keys, "UI mode (console, gtk,fox)") do |arg| 
    40   runner = arg 
    41 end 
    42 begin 
    43   argv = opt.parse(*ARGV) 
    44 rescue OptionParser::ParseError 
    45   opt.abort($!) 
    46 end 
    47  
    48 if argv.empty? 
    49   argv = [File.dirname(__FILE__)] 
    50 end 
    51 argv.collect! do |arg| 
    52   if File.directory?(arg) 
    53     Dir.glob(File.join(arg, "**", "test_*.rb")).sort 
    54   else 
    55     arg 
    56   end 
    57 end.flatten! 
    58  
    59 argv.each do |tc_name| 
    60   require tc_name 
    61 end 
    62  
    63 runners_map[runner].call(BulkTestSuite.suite) 
     7runner = Test::Unit::AutoRunner.new(true) 
     8runner.to_run.concat(ARGV) 
     9runner.to_run << File.dirname(__FILE__) if runner.to_run.empty? 
     10runner.run 
  • trunk/test/soap/calc/server.rb

    r965 r1016  
    1414 
    1515if $0 == __FILE__ 
    16   status = CalcServer.new('CalcServer', nil, '0.0.0.0', 7000).start 
     16  status = CalcServer.new('CalcServer', nil, '0.0.0.0', 17171).start 
    1717end 
  • trunk/test/soap/calc/server2.rb

    r965 r1016  
    1717 
    1818if $0 == __FILE__ 
    19   status = CalcServer2.new('CalcServer', 'http://tempuri.org/calcService', '0.0.0.0', 7000).start 
     19  status = CalcServer2.new('CalcServer', 'http://tempuri.org/calcService', '0.0.0.0', 17171).start 
    2020end 
  • trunk/test/soap/calc/test_calc.rb

    r985 r1016  
    1313 
    1414class TestCalc < Test::Unit::TestCase 
     15  Port = 17171 
     16 
    1517  def setup 
    16     @server = CalcServer.new(self.class.name, nil, '0.0.0.0', 7000
     18    @server = CalcServer.new(self.class.name, nil, '0.0.0.0', Port
    1719    @server.level = Logger::Severity::FATAL 
    1820    @t = Thread.new { 
     
    2224      sleep 0.1 
    2325    end 
    24     @calc = SOAP::RPC::Driver.new('http://localhost:7000/', 'http://tempuri.org/calcService') 
     26    @calc = SOAP::RPC::Driver.new("http://localhost:#{Port}/", 'http://tempuri.org/calcService') 
    2527    @calc.add_method('add', 'lhs', 'rhs') 
    2628    @calc.add_method('sub', 'lhs', 'rhs') 
  • trunk/test/soap/calc/test_calc2.rb

    r985 r1016  
    1313 
    1414class TestCalc2 < Test::Unit::TestCase 
     15  Port = 17171 
     16 
    1517  def setup 
    16     @server = CalcServer2.new('CalcServer', 'http://tempuri.org/calcService', '0.0.0.0', 7000
     18    @server = CalcServer2.new('CalcServer', 'http://tempuri.org/calcService', '0.0.0.0', Port
    1719    @server.level = Logger::Severity::FATAL 
    1820    @t = Thread.new { 
     
    2224      sleep 0.1 
    2325    end 
    24     @var = SOAP::RPC::Driver.new('http://localhost:7000/', 'http://tempuri.org/calcService') 
     26    @var = SOAP::RPC::Driver.new("http://localhost:#{Port}/", 'http://tempuri.org/calcService') 
    2527    @var.add_method('set', 'newValue') 
    2628    @var.add_method('get') 
  • trunk/test/soap/calc/test_calc_cgi.rb

    r1000 r1016  
    1717  ) 
    1818 
     19  Port = 17171 
     20 
    1921  def setup 
    2022    logger = Logger.new(STDERR) 
     
    2325      :BindAddress => "0.0.0.0", 
    2426      :Logger => logger, 
    25       :Port => 8808
     27      :Port => Port
    2628      :AccessLog => [], 
    2729      :DocumentRoot => File.dirname(File.expand_path(__FILE__)), 
     
    3537      sleep 0.1 
    3638    end 
    37     @calc = SOAP::RPC::Driver.new('http://localhost:8808/server.cgi', 'http://tempuri.org/calcService') 
     39    @calc = SOAP::RPC::Driver.new("http://localhost:#{Port}/server.cgi", 'http://tempuri.org/calcService') 
    3840    @calc.add_method('add', 'lhs', 'rhs') 
    3941    @calc.add_method('sub', 'lhs', 'rhs') 
  • trunk/test/soap/helloworld/hw_s.rb

    r985 r1016  
    1212 
    1313if $0 == __FILE__ 
    14   server = HelloWorldServer.new('hws', 'urn:hws', '0.0.0.0', 2000
     14  server = HelloWorldServer.new('hws', 'urn:hws', '0.0.0.0', 17171
    1515  server.start 
    1616end 
  • trunk/test/soap/helloworld/test_helloworld.rb

    r985 r1016  
    1313 
    1414class TestHelloWorld < Test::Unit::TestCase 
     15  Port = 17171 
     16 
    1517  def setup 
    16     @server = HelloWorldServer.new('hws', 'urn:hws', '0.0.0.0', 2000
     18    @server = HelloWorldServer.new('hws', 'urn:hws', '0.0.0.0', Port
    1719    @server.level = Logger::Severity::UNKNOWN 
    1820    @t = Thread.new { 
     
    2224      sleep 0.1 
    2325    end 
    24     @client = SOAP::RPC::Driver.new('http://localhost:2000/', 'urn:hws') 
     26    @client = SOAP::RPC::Driver.new("http://localhost:#{Port}/", 'urn:hws') 
    2527    @client.add_method("hello_world", "from") 
    2628  end