summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/tests/ImplRepo/locked/run_test.pl
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/tests/ImplRepo/locked/run_test.pl')
-rwxr-xr-xTAO/orbsvcs/tests/ImplRepo/locked/run_test.pl64
1 files changed, 29 insertions, 35 deletions
diff --git a/TAO/orbsvcs/tests/ImplRepo/locked/run_test.pl b/TAO/orbsvcs/tests/ImplRepo/locked/run_test.pl
index 099f5fdad62..78ed21379be 100755
--- a/TAO/orbsvcs/tests/ImplRepo/locked/run_test.pl
+++ b/TAO/orbsvcs/tests/ImplRepo/locked/run_test.pl
@@ -18,7 +18,6 @@ $pfile = PerlACE::LocalFile ("persistence.dat");
$IMR_LOCATOR = new PerlACE::Process ("../../../ImplRepo_Service/ImplRepo_Service");
$IMR_ACTIVATOR = new PerlACE::Process ("../../../ImplRepo_Service/ImR_Activator");
$TAO_IMR = new PerlACE::Process ("../../../../../bin/tao_imr");
-
################################################################################
$errors = 0;
@@ -30,7 +29,7 @@ unlink $pfile;
################################################################################
## Start the implementation Repository Locator
-$IMR_LOCATOR->Arguments ("-o $imr_locator_ior ");
+$IMR_LOCATOR->Arguments ("-p $pfile -o $imr_locator_ior -d 1");
$IMR_LOCATOR->Spawn ();
if (PerlACE::waitforfile_timed ($imr_locator_ior, 10) == -1) {
@@ -41,7 +40,7 @@ if (PerlACE::waitforfile_timed ($imr_locator_ior, 10) == -1) {
## Start the implementation Repository Activator
-$IMR_ACTIVATOR->Arguments ("-o $imr_activator_ior -d 0 -p $pfile -ORBInitRef ImplRepoService=file://$imr_locator_ior");
+$IMR_ACTIVATOR->Arguments ("-o $imr_activator_ior -d 1 -ORBInitRef ImplRepoService=file://$imr_locator_ior");
$IMR_ACTIVATOR->Spawn ();
if (PerlACE::waitforfile_timed ($imr_activator_ior, 10) == -1) {
@@ -57,9 +56,9 @@ if (PerlACE::waitforfile_timed ($imr_activator_ior, 10) == -1) {
print "===== Adding a server\n";
$TAO_IMR->Arguments("-ORBInitRef ImplRepoService=file://$imr_locator_ior"
- . " add Foo -c foobarbaz");
+ . " add Foo -c foobarbaz");
-$taoimr = $TAO_IMR->SpawnWaitKill (60);
+$taoimr = $TAO_IMR->SpawnWaitKill (10);
if ($taoimr != 0) {
print STDERR "ERROR: tao_imr (add) returned $taoimr\n";
@@ -69,9 +68,9 @@ if ($taoimr != 0) {
print "===== Updating a server\n";
$TAO_IMR->Arguments("-ORBInitRef ImplRepoService=file://$imr_locator_ior"
- . " update Foo -w foodir");
+ . " update Foo -w foodir" );
-$taoimr = $TAO_IMR->SpawnWaitKill (60);
+$taoimr = $TAO_IMR->SpawnWaitKill (10);
if ($taoimr != 0) {
print STDERR "ERROR: tao_imr (update) returned $taoimr\n";
@@ -83,7 +82,7 @@ print "===== Removing a server\n";
$TAO_IMR->Arguments("-ORBInitRef ImplRepoService=file://$imr_locator_ior"
. " remove Foo");
-$taoimr = $TAO_IMR->SpawnWaitKill (60);
+$taoimr = $TAO_IMR->SpawnWaitKill (10);
if ($taoimr != 0) {
print STDERR "ERROR: tao_imr (remove) returned $taoimr\n";
@@ -95,7 +94,7 @@ print "===== Readding a server\n";
$TAO_IMR->Arguments("-ORBInitRef ImplRepoService=file://$imr_locator_ior"
. " add Foo -c foobarbaz");
-$taoimr = $TAO_IMR->SpawnWaitKill (60);
+$taoimr = $TAO_IMR->SpawnWaitKill (10);
if ($taoimr != 0) {
print STDERR "ERROR: tao_imr (add) returned $taoimr\n";
@@ -114,19 +113,10 @@ if ($iserver != 0) {
unlink $imr_locator_ior;
-$iserver = $IMR_ACTIVATOR->TerminateWaitKill (5);
-
-if ($iserver != 0) {
- print STDERR "ERROR: IMR returned $iserver\n";
- ++$errors;
-}
-
-unlink $imr_activator_ior;
-
################################################################################
## Restart the Implementation Repository in locked mode.
-$IMR_LOCATOR->Arguments ("-o $imr_locator_ior ");
+$IMR_LOCATOR->Arguments ("-l -p $pfile -o $imr_locator_ior -d 1");
$IMR_LOCATOR->Spawn ();
if (PerlACE::waitforfile_timed ($imr_locator_ior, 10) == -1) {
@@ -135,27 +125,31 @@ if (PerlACE::waitforfile_timed ($imr_locator_ior, 10) == -1) {
exit 1;
}
-$IMR_ACTIVATOR->Arguments ("-o $imr_activator_ior -d 0 -l -p $pfile -ORBInitRef ImplRepoService=file://$imr_locator_ior");
-$IMR_ACTIVATOR->Spawn ();
-
-if (PerlACE::waitforfile_timed ($imr_activator_ior, 10) == -1) {
- print STDERR "ERROR: waiting for $imr_activator_ior\n";
- $IMR_ACTIVATOR->Kill ();
- $IMR_LOCATOR->Kill ();
- exit 1;
-}
-
################################################################################
## Test out commands on the IMR
+print "===== Listing registered servers.\n";
+
+$TAO_IMR->Arguments("-ORBInitRef ImplRepoService=file://$imr_locator_ior"
+ . " list");
+
+$taoimr = $TAO_IMR->SpawnWaitKill (10);
+
+if ($taoimr != 0) {
+ print STDERR "ERROR: tao_imr (list) returned $taoimr\n";
+ ++$errors;
+}
+
print "===== Adding a server (should fail)\n";
$TAO_IMR->Arguments("-ORBInitRef ImplRepoService=file://$imr_locator_ior"
. " add Foo2 -c foobarbaz");
-$taoimr = $TAO_IMR->SpawnWaitKill (60);
+$taoimr = $TAO_IMR->SpawnWaitKill (10);
-if ($taoimr != 2) {
+## Note : If you receive a 5 (NOT_FOUND) then it's likely that
+## persistence isn't working correctly.
+if ($taoimr != 2) { # NO_PERMISSION
print STDERR "ERROR: tao_imr (add) returned $taoimr\n";
++$errors;
}
@@ -165,9 +159,9 @@ print "===== Updating a server (should fail)\n";
$TAO_IMR->Arguments("-ORBInitRef ImplRepoService=file://$imr_locator_ior"
. " update Foo -w foodir");
-$taoimr = $TAO_IMR->SpawnWaitKill (60);
+$taoimr = $TAO_IMR->SpawnWaitKill (10);
-if ($taoimr != 2) {
+if ($taoimr != 2) { # NO_PERMISSION
print STDERR "ERROR: tao_imr (update) returned $taoimr\n";
++$errors;
}
@@ -177,9 +171,9 @@ print "===== Removing a server (should fail)\n";
$TAO_IMR->Arguments("-ORBInitRef ImplRepoService=file://$imr_locator_ior"
. " remove Foo");
-$taoimr = $TAO_IMR->SpawnWaitKill (60);
+$taoimr = $TAO_IMR->SpawnWaitKill (10);
-if ($taoimr != 2) {
+if ($taoimr != 2) { # NO_PERMISSION
print STDERR "ERROR: tao_imr (remove) returned $taoimr\n";
++$errors;
}