2
# run_test.pl,v 1.1 2003/11/18 14:55:10 smcqueen Exp
4
eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
5
& eval 'exec perl -S $0 $argv:q'
10
use lib '../../../bin';
11
use PerlACE::Run_Test;
14
$server_ior_file = PerlACE::LocalFile ("server.ior");
16
# The client and server processes
17
$SERVER = new PerlACE::Process(PerlACE::LocalFile("server"));
18
$CLIENT = new PerlACE::Process(PerlACE::LocalFile("client"));
20
# We want the server to run on a fixed port
21
$port = PerlACE::uniqueid () + 10001; # This can't be 10000 for Chorus 4.0
23
# We would normally have to specify the server port / host via -ORBEndpoint
24
# but we are testing the ability to define it as an environment property
25
$ENV {'TAO_ORBENDPOINT'} = "iiop://localhost:$port";
30
# We don't need the IOR file but we can wait on the file
31
if (PerlACE::waitforfile_timed ($server_ior_file, 10) == -1)
33
print STDERR "ERROR: cannot find $server_ior_file\n";
38
# Try the corbaloc URL for the server. It's almost impossible that this will work
39
# if the endpoint hasn't been read from the environment so we call success a pass.
40
$CLIENT->Arguments("-k corbaloc:iiop:localhost:$port/Name-with-hyphens");
41
if ($CLIENT->SpawnWaitKill (30) != 0)
43
print STDERR "ERROR: Bug rt596 Regression failed. Endpoint was not read from environment\n";
49
$SERVER->TerminateWaitKill (5);
50
unlink $server_ior_file;