# Copyright: Copyright (c) 2004 Nicolas Despres. All rights reserved. # Author: Nicolas Despres . # License: Gnu General Public License. # $LastChangedBy: polrop $ # $Id: session_client_test.rb 91 2005-01-09 22:24:40Z polrop $ # Test client used by session_manager. if __FILE__ == $0 require 'drb/drb' server = nil service = nil uri = ARGV.shift num = ARGV.shift name = ARGV.shift begin STDERR.puts "#{num}:A: start server" if $VERBOSE server = DRb.start_service STDERR.puts "#{num}:B: bind front" if $VERBOSE front = DRb::DRbObject.new(nil, uri) STDERR.puts "#{num}:C: start service" if $VERBOSE service = front.service(name) ensure begin STDERR.puts "#{num}:D: stop service" if $VERBOSE service.stop_service unless service.nil? rescue DRb::DRbConnError STDERR.puts "#{num}: stop service too late" if $VERBOSE ensure STDERR.puts "#{num}:E: stop server" if $VERBOSE server.stop_service unless server.nil? STDERR.puts "#{num}:F: finish" if $VERBOSE end end end