diff options
author | jwh1 <jwh1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-06-11 23:50:32 +0000 |
---|---|---|
committer | jwh1 <jwh1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-06-11 23:50:32 +0000 |
commit | 1ae9557f9f5fe4902eef979d328b0a7243a8a802 (patch) | |
tree | 1e0bcb3b117b21867c1913407b0a254f5586098f | |
parent | 52512c7c7bb1c559f10743f80d048dc5d099615e (diff) | |
download | ATCD-1ae9557f9f5fe4902eef979d328b0a7243a8a802.tar.gz |
Updated all calls to wait() to be timed calls.
jwh1
-rwxr-xr-x | TAO/examples/POA/Explicit_Activation/run_test.pl | 68 |
1 files changed, 60 insertions, 8 deletions
diff --git a/TAO/examples/POA/Explicit_Activation/run_test.pl b/TAO/examples/POA/Explicit_Activation/run_test.pl index 18df6a4317a..7006effaafc 100755 --- a/TAO/examples/POA/Explicit_Activation/run_test.pl +++ b/TAO/examples/POA/Explicit_Activation/run_test.pl @@ -59,20 +59,72 @@ unlink $iorfile_1; unlink $iorfile_2; unlink $iorfile_3; + $SV = Process::Create ($EXEPREFIX."server$Process::EXE_EXT", "-f $iorfile $extra_args"); -ACE::waitforfile ($iorfile_1); -ACE::waitforfile ($iorfile_2); -ACE::waitforfile ($iorfile_3); +if (ACE::waitforfile_timed ($iorfile_1, 5) == -1) { + print STDERR "ERROR: cannot find file <$iorfile_1>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} + +if (ACE::waitforfile_timed ($iorfile_2, 5) == -1) { + print STDERR "ERROR: cannot find file <$iorfile_2>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} + +if (ACE::waitforfile_timed ($iorfile_3, 5) == -1) { + print STDERR "ERROR: cannot find file <$iorfile_3>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} + +$CL_1 = Process::Create ("../Generic_Servant/client$Process::EXE_EXT ", + " $extra_args $oneway -i $iterations -f $iorfile_1"); +$CL_2 = Process::Create ("../Generic_Servant/client$Process::EXE_EXT ", + " $extra_args $oneway -i $iterations -f $iorfile_2"); +$CL_3 = Process::Create ("../Generic_Servant/client$Process::EXE_EXT ", + " $extra_args $oneway -i $iterations -f $iorfile_3 -x"); + + +$client_1 = $CL_1->TimedWait (60); +if ($client_1 == -1) { + print STDERR "ERROR: client 1 timedout\n"; + $CL_1->Kill (); $CL_1->TimedWait (1); +} + +$client_2 = $CL_2->TimedWait (60); +if ($client_2 == -1) { + print STDERR "ERROR: client 2 timedout\n"; + $CL_2->Kill (); $CL_2->TimedWait (1); +} + +$client_3 = $CL_3->TimedWait (60); +if ($client_3 == -1) { + print STDERR "ERROR: client 3 timedout\n"; + $CL_3->Kill (); $CL_3->TimedWait (1); +} + -$status = system ("../Generic_Servant/client$Process::EXE_EXT $extra_args $oneway -i $iterations -f $iorfile_1"); -$status = system ("../Generic_Servant/client$Process::EXE_EXT $extra_args $oneway -i $iterations -f $iorfile_2"); -$status = system ("../Generic_Servant/client$Process::EXE_EXT $extra_args $oneway -i $iterations -f $iorfile_3 -x"); +$server = $SV->TimedWait (5); +if ($server == -1) { + print STDERR "ERROR: server timedout\n"; + $SV->Kill (); $SV->TimedWait (1); +} unlink $iorfile_1; unlink $iorfile_2; unlink $iorfile_3; -$SV->Wait (); +if ($server != 0 || + $client_1 != 0 || + $client_2 != 0 || + $client_3 != 0) +{ + exit 1; +} + +exit 0; + -exit $status; |