1 eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
2 & eval 'exec perl -S $0 $argv:q'
7 use lib
"$ENV{ACE_ROOT}/bin";
8 use PerlACE
::TestTarget
;
19 my $server = PerlACE
::TestTarget
::create_target
(1) || die "Create target 1 failed\n";
20 my $client1 = PerlACE
::TestTarget
::create_target
(2) || die "Create target 2 failed\n";
21 my $client2 = PerlACE
::TestTarget
::create_target
(3) || die "Create target 3 failed\n";
23 my $iorfile = "test.ior";
25 #Files which used by server
26 my $server_iorfile = $server->LocalFile ($iorfile);
27 $server->DeleteFile($iorfile);
29 $hostname = $server->HostName ();
30 $port = $server->RandomPort ();
32 $SV = $server->CreateProcess ("server",
33 "-ORBdebuglevel $debug_level " .
34 "-ORBEndpoint iiop://$hostname:$port " .
35 "-o $server_iorfile");
37 # Client 1 expects OBJECT_NOT_EXIST exception ("-e 1")
38 $CL1 = $client1->CreateProcess ("client",
39 "-ORBdebuglevel $debug_level " .
40 "-k corbaloc::$hostname:$port/Simple_Server " .
42 "-ORBForwardInvocationOnObjectNotExist 0");
44 # Client 2 does not expects OBJECT_NOT_EXIST exception ("-e 0")
45 $CL2 = $client2->CreateProcess ("client",
46 "-ORBdebuglevel $debug_level " .
47 "-x -k corbaloc::$hostname:$port/Simple_Server " .
49 "-ORBForwardInvocationOnObjectNotExist 1");
51 $server_status = $SV->Spawn ();
53 if ($server_status != 0) {
54 print STDERR
"ERROR: server returned $server_status\n";
58 if ($server->WaitForFileTimed ($iorfile,
59 $server->ProcessStartWaitInterval()) == -1) {
60 print STDERR
"ERROR: cannot find file <$server_iorfile>\n";
67 print STDERR
"==== Running first client with -ORBForwardInvocationOnObjectNotExist 0\n";
69 $client_status = $CL1->SpawnWaitKill ($client1->ProcessStartWaitInterval() + 45);
71 if ($client_status != 0) {
72 print STDERR
"ERROR: client returned $client_status\n";
76 print STDERR
"==== Running second client with -ORBForwardInvocationOnObjectNotExist 1\n";
78 $client_status = $CL2->SpawnWaitKill ($client2->ProcessStartWaitInterval() + 45);
80 if ($client_status != 0) {
81 print STDERR
"ERROR: client returned $client_status\n";
85 $server_status = $SV->WaitKill ($server->ProcessStopWaitInterval());
87 if ($server_status != 0) {
88 print STDERR
"ERROR: server returned $server_status\n";
92 $server->DeleteFile($iorfile);