summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs
diff options
context:
space:
mode:
authorjwh1 <jwh1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-06-22 22:13:49 +0000
committerjwh1 <jwh1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-06-22 22:13:49 +0000
commitc5297184be87e858260eba324e25611caeb37786 (patch)
treee9149d001922dae54962a81fa80acab839f32c66 /TAO/orbsvcs
parentb43a960dc1912c97227a1e9f6d30f5f5acf4c345 (diff)
downloadATCD-c5297184be87e858260eba324e25611caeb37786.tar.gz
Changed to reflect new guidelines on blocking.
Diffstat (limited to 'TAO/orbsvcs')
-rwxr-xr-xTAO/orbsvcs/tests/Logger/run_test.pl15
-rwxr-xr-xTAO/orbsvcs/tests/Property/run_test.pl14
-rwxr-xr-xTAO/orbsvcs/tests/Time/run_test.pl98
3 files changed, 93 insertions, 34 deletions
diff --git a/TAO/orbsvcs/tests/Logger/run_test.pl b/TAO/orbsvcs/tests/Logger/run_test.pl
index c54cfb2facf..3b1696ea10c 100755
--- a/TAO/orbsvcs/tests/Logger/run_test.pl
+++ b/TAO/orbsvcs/tests/Logger/run_test.pl
@@ -14,6 +14,9 @@ require Process;
# amount of delay between running the servers
$sleeptime = 3;
+# error register
+$status = 0;
+
# Starts the Logging Service
sub service
{
@@ -29,7 +32,7 @@ sub test
my $args = "";
my $prog = $EXEPREFIX."Logging_Test".$EXE_EXT;
- system ("$prog $args");
+ $CL = Process::Create ($prog, $args);
}
# Start the service
@@ -42,7 +45,13 @@ sleep $sleeptime;
test ();
# Give the client time to log and exit
-sleep 3;
+if ($CL->TimedWait (60) == -1) {
+ print STDERR "ERROR: client timedout\n";
+ $CL->Kill (); $CL->TimedWait (1);
+ $status = 1;
+}
# Kill the service
-$SV->Kill ();
+$SV->Kill (); $SV->TimedWait (1);
+
+exit $status;
diff --git a/TAO/orbsvcs/tests/Property/run_test.pl b/TAO/orbsvcs/tests/Property/run_test.pl
index 474faed8f27..1ae787f3bbb 100755
--- a/TAO/orbsvcs/tests/Property/run_test.pl
+++ b/TAO/orbsvcs/tests/Property/run_test.pl
@@ -15,6 +15,7 @@ require Uniqueid;
# amount of delay between running the servers
$sleeptime = 6;
+$status = 0;
# variables for parameters
@@ -53,6 +54,15 @@ sleep $sleeptime;
client ();
sleep $sleeptime;
-$NS->Kill ();
-$SV->Kill ();
+
+if ($CL->TimedWait (60) == -1) {
+ print STDERR "ERROR: client timedout\n";
+ $status = 1;
+ $CL->Kill (); $CL->TimedWait (1);
+}
+
+$NS->Kill (); $NS->TimedWait (1);
+$SV->Kill (); $NS->TimedWait (1);
+
+exit $status;
diff --git a/TAO/orbsvcs/tests/Time/run_test.pl b/TAO/orbsvcs/tests/Time/run_test.pl
index a0236d03047..1f1f47aefcd 100755
--- a/TAO/orbsvcs/tests/Time/run_test.pl
+++ b/TAO/orbsvcs/tests/Time/run_test.pl
@@ -12,6 +12,7 @@ require ACEutils;
$server_ior = "server_ior";
$clerk_ior = "clerk_ior";
$implrepo_ior = "implrepo.ior";
+$status = 0;
# Make sure the files are gone, so we can wait on them.
@@ -31,13 +32,18 @@ sub time_service_test_using_naming_service
sleep 10;
- $status = system ($EXEPREFIX."client".$EXE_EXT.
- "");
+ $CL = system ($EXEPREFIX."client".$EXE_EXT, "");
+
+ if ($CL->TimedWait (60) == -1) {
+ print STDERR "ERROR: client timedout\n";
+ $status = 1;
+ $CL->Kill (); $CL->TimedWait (1);
+ }
$SV1->Kill ();
$SV2->Kill ();
- $SV1->Wait ();
- $SV2->Wait ();
+ $SV1->TimedWait (1);
+ $SV2->TimedWait (1);
}
sub time_service_test_using_files
@@ -45,24 +51,41 @@ sub time_service_test_using_files
$SV1 = Process::Create ($time_dir."server".$EXE_EXT,
"-o $server_ior");
- ACE::waitforfile ($server_ior);
- sleep 5;
-
- $SV2 = Process::Create ($time_dir."clerk".$EXE_EXT,
- "-f $server_ior -o clerk_ior -t 2");
-
- ACE::waitforfile ($clerk_ior);
-
- sleep 10;
-
- $status = system ($EXEPREFIX."client".$EXE_EXT.
- " -f clerk_ior");
-
- $SV1->Kill ();
- $SV2->Kill ();
- $SV1->Wait ();
- $SV2->Wait ();
-
+ if (ACE::waitforfile_timed ($server_ior, 5) == -1) {
+ print STDERR "ERROR: timedout waiting for file <$server_ior>\n";
+ $status = 1;
+ $SV1->Kill (); $SV1->TimedWait (1);
+ }
+ else {
+
+ sleep 5;
+
+ $SV2 = Process::Create ($time_dir."clerk".$EXE_EXT,
+ "-f $server_ior -o clerk_ior -t 2");
+
+ if (ACE::waitforfile_timed ($clerk_ior, 5) == -1) {
+ print STDERR "ERROR: timedout waiting for file <$clerk_ior>\n";
+ $status = 1;
+ $SV2->Kill (); $SV2->TimedWait (1);
+ }
+ else {
+
+ sleep 10;
+
+ $CL = Process::Create ($EXEPREFIX."client".$EXE_EXT,
+ " -f clerk_ior");
+ if ($CL->TimedWait (60) == -1) {
+ print STDERR "ERROR: client timedout\n";
+ $status = 1;
+ $CL->Kill (); $CL->TimedWait (1);
+ }
+
+ $SV1->Kill ();
+ $SV2->Kill ();
+ $SV1->TimedWait (1);
+ $SV2->TimedWait (1);
+ }
+ }
unlink $clerk_ior;
unlink $server_ior;
}
@@ -73,12 +96,21 @@ sub time_service_test_using_ir
$IR = Process::Create ($ir_dir."ImplRepo_Service".$EXE_EXT,
"-ORBsvcconf implrepo.conf -d 1");
- ACE::waitforfile ($implrepo_ior);
+ if (ACE::waitforfile_timed ($implrepo_ior, 5) == -1) {
+ print STDERR "ERROR: timedout waiting for file <$implrepo_ior>\n";
+ $IR->Kill (); $IR->TimedWait (1);
+ exit 1;
+ }
$SV1 = Process::Create ($time_dir."server".$EXE_EXT,
"-o $server_ior -i -r");
- ACE::waitforfile ($server_ior);
+ if (ACE::waitforfile_timed ($server_ior, 5) == -1) {
+ print STDERR "ERROR: timedout waiting for file <$implerepo_ior>\n";
+ $IR->Kill (); $IR->TimedWait (1);
+ $SV1->Kill (); $SV1->TimedWait (1);
+ exit 1;
+ }
sleep 10;
@@ -87,14 +119,20 @@ sub time_service_test_using_ir
sleep 10;
- system($EXEPREFIX."client.$EXE_EXT -f $clerk_ior");
-
+ $CL = Process::Create ($EXEPREFIX."client.$EXE_EXT", "-f $clerk_ior");
+
+ if ($CL->TimedWait (60) == -1) {
+ print STDERR "ERROR: client timedout\n";
+ $status = 1;
+ $CL->Kill (); $CL->TimedWait (1);
+ }
+
$IR->Kill ();
- $IR->Wait ();
+ $IR->TimedWait (1);
$SV1->Kill ();
- $SV1->Wait ();
+ $SV1->TimedWait (1);
$SV2->Kill ();
- $SV2->Wait ();
+ $SV2->TimedWait (1);
unlink $clerk_ior;
unlink $server_ior;
@@ -137,3 +175,5 @@ for ($i = 0; $i <= $#ARGV; $i++)
print "run_test: Unknown Option: ".$ARGV[$i]."\n";
}
}
+
+exit $status;