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
;
13 $conf = $PerlACE::svcconf_ext
;
21 my $server = PerlACE
::TestTarget
::create_target
(1) || die "Create target 1 failed\n";
22 my $client = PerlACE
::TestTarget
::create_target
(2) || die "Create target 2 failed\n";
24 $iorbase = "notify.ior";
25 $notify_conf = "notify" . $conf;
27 my $server_iorfile = $server->LocalFile ($iorbase);
29 my $persistent_file_xml = "persistency.notif.xml";
30 my $persistent_file_000 = "persistency.notif.000";
32 my $server_conf = $server->LocalFile ($notify_conf);
34 my $server_persistent_file = $server->LocalFile ($persistent_file_xml);
35 my $persistent_file = $client->LocalFile ($persistent_file_xml);
37 $server->DeleteFile($iorbase);
38 $client->DeleteFile ($persistent_file_xml);
39 $client->DeleteFile ($persistent_file_000);
41 $SV = $server->CreateProcess ("$ENV{TAO_ROOT}/orbsvcs/Notify_Service/tao_cosnotification",
42 "-ORBdebuglevel $debug_level " .
44 "-IORoutput $server_iorfile " .
45 "-ORBSvcConf $server_conf");
47 $CL = $client->CreateProcess ("proxy_dummy", "-o $persistent_file");
49 $client_status = $CL->Spawn ();
51 if ($client_status != 0) {
52 print STDERR
"ERROR: client returned $client_status\n";
56 if ($client->WaitForFileTimed ($persistent_file_xml,
57 $client->ProcessStartWaitInterval()) == -1) {
58 print STDERR
"ERROR: cannot find file <$persistent_file_xml>\n";
59 $CL->Kill (); $CL->TimedWait (1);
63 $server_status = $SV->Spawn ();
65 if ($server_status != 0) {
66 print STDERR
"ERROR: server returned $server_status\n";
70 if ($server->WaitForFileTimed ($iorbase,
71 $server->ProcessStartWaitInterval()) == -1) {
72 print STDERR
"ERROR: cannot find file <$server_iorfile>\n";
73 $SV->Kill (); $SV->TimedWait (1);
77 sleep($server->ProcessStartWaitInterval / 2);
80 open (I_FILE
, "$persistent_file") ;
90 print STDERR
"ERROR: validate consumer/supplier test failed.\n" ;
94 print STDOUT
"validate consumer/supplier test succeeded.\n";
100 $server->DeleteFile($iorbase);
101 $client->DeleteFile ($persistent_file_xml);
102 $client->DeleteFile ($persistent_file_000);