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 $number_of_clients = 1;
13 my $server = PerlACE
::TestTarget
::create_target
(1) || die "Create target 1 failed\n";
14 my $client = PerlACE
::TestTarget
::create_target
(2) || die "Create target 2 failed\n";
19 description
=> "Invoking methods on servant in second RT thread pool (with lanes)",
23 for $test (@configurations) {
24 $server->DeleteFile($test->{file
});
25 $client->DeleteFile($test->{file
});
34 for ($i = 0; $i < $clients; $i++) {
35 $CL[$i] = $client->CreateProcess ("client", $arg);
39 for ($i = 0; $i < $clients; $i++) {
40 $client_status = $CL[$i]->WaitKill ($client->ProcessStopWaitInterval () + 90);
41 if ($client_status != 0) {
42 print STDERR
"ERROR: client returned $client_status\n";
49 $SV = $server->CreateProcess ("server");
52 for $test (@configurations) {
53 if ($server->WaitForFileTimed ($test->{file
},
54 $server->ProcessStartWaitInterval()) == -1) {
55 $server_status = $SV->TimedWait (1);
56 if ($server_status == 2) {
57 # Mark as no longer running to avoid errors on exit.
61 print STDERR
"ERROR: cannot find ior file: $test->{file}\n";
68 for $test (@configurations) {
69 print STDERR
"\n*************************************************************\n";
70 print STDERR
"$test->{description}\n";
71 print STDERR
"*************************************************************\n\n";
73 run_clients
("-k file://".$client->LocalFile($test->{file
}), $number_of_clients);
76 print STDERR
"\n************************\n";
77 print STDERR
"Shutting down the server\n";
78 print STDERR
"************************\n\n";
80 run_clients
("-k file://".$client->LocalFile($configurations[0]->{file
})." -i 1 -x", 1);
84 $server_status = $SV->WaitKill ($server->ProcessStopWaitInterval () + (2 * $number_of_clients * 100));
86 if ($server_status != 0) {
87 print STDERR
"ERROR: server returned $server_status\n";
91 for $test (@configurations) {
92 $server->DeleteFile ($test->{file
});
93 $client->DeleteFile ($test->{file
});