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
;
10 my $server = PerlACE
::TestTarget
::create_target
(1) || die "Create target 1 failed\n";
11 my $client = PerlACE
::TestTarget
::create_target
(2) || die "Create target 2 failed\n";
13 $number_of_clients = 4;
15 $continuous = ($^O
eq 'hpux');
20 description
=> "Invoking methods on servant in default thread pool",
23 description
=> "Invoking methods on servant in first RT thread pool (without lanes)",
26 description
=> "Invoking methods on servant in second RT thread pool (with lanes)",
30 for $test (@configurations) {
31 $server->DeleteFile ($test->{file
});
32 $client->DeleteFile ($test->{file
});
42 for ($i = 0; $i < $clients; $i++) {
43 $CL[$i] = $client->CreateProcess ("client", $arg);
47 for ($i = 0; $i < $clients; $i++) {
48 $client_status = $CL[$i]->WaitKill ($client->ProcessStopWaitInterval (120));
49 if ($client_status != 0) {
50 print STDERR
"ERROR: client returned $client_status\n";
55 print STDERR
"Finished running clients";
58 $SV = $server->CreateProcess ("server");
61 $SV->Arguments ("-ORBSvcConf continuous$PerlACE::svcconf_ext");
66 for $test (@configurations) {
67 if ($server->WaitForFileTimed ($test->{file
},
68 $server->ProcessStartWaitInterval()) == -1) {
69 $server_status = $SV->TimedWait (1);
70 if ($server_status == 2) {
71 # Mark as no longer running to avoid errors on exit.
76 print STDERR
"ERROR: cannot find ior file: $test->{file}\n";
83 for $test (@configurations) {
84 print STDERR
"\n*************************************************************\n";
85 print STDERR
"$test->{description}\n";
86 print STDERR
"*************************************************************\n\n";
88 $iorfile = $client->LocalFile ($test->{file
});
89 run_clients
("-k file://$iorfile", $number_of_clients);
90 print STDERR
"Prepare next cycle";
93 print STDERR
"\n************************\n";
94 print STDERR
"Shutting down the server\n";
95 print STDERR
"************************\n\n";
97 $client_iorfile = $client->LocalFile ($configurations[0]->{file
});
98 run_clients
("-k file://$client_iorfile -i 0 -x", 1);
102 $server_status = $SV->WaitKill ($server->ProcessStopWaitInterval () + (2 * $number_of_clients * 100));
104 if ($server_status != 0) {
105 print STDERR
"ERROR: server returned $server_status\n";
109 for $test (@configurations) {
110 $client->DeleteFile ($test->{file
});
111 $server->DeleteFile ($test->{file
});