summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwilson_d <wilson_d@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-12-05 17:50:03 +0000
committerwilson_d <wilson_d@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-12-05 17:50:03 +0000
commit02750631cdb485f6d2828707971832720ae5157a (patch)
tree0e02330bef1aa60439a8cb3fcdd8ee458c36b269
parent05990c999c37a88791e6c849cb790d9662c18c1c (diff)
downloadATCD-02750631cdb485f6d2828707971832720ae5157a.tar.gz
ChangeLogTag: Fri Dec 5 11:49:01 2003 Dale Wilson <wilson_d@ociweb.com>
-rw-r--r--TAO/ChangeLog8
-rwxr-xr-xTAO/orbsvcs/tests/FT_App/run_test_basic.pl49
-rwxr-xr-xTAO/orbsvcs/tests/FT_App/run_test_detector.pl58
-rwxr-xr-xTAO/orbsvcs/tests/FT_App/run_test_notifier.pl65
-rwxr-xr-xTAO/orbsvcs/tests/FT_App/run_test_registry.pl118
5 files changed, 186 insertions, 112 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 77a079f82c2..fdb4e934a22 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,11 @@
+Fri Dec 5 11:49:01 2003 Dale Wilson <wilson_d@ociweb.com>
+
+ * orbsvcs/tests/FT_App/run_test_basic.pl:
+ * orbsvcs/tests/FT_App/run_test_detector.pl:
+ * orbsvcs/tests/FT_App/run_test_notifier.pl:
+ * orbsvcs/tests/FT_App/run_test_registry.pl:
+ Cleaning up the comments mostly.
+
Thu Dec 4 16:46:15 2003 Dale Wilson <wilson_d@ociweb.com>
* orbsvcs/FT_ReplicationManager/FT_DefaultFaultAnalyzer.cpp:
diff --git a/TAO/orbsvcs/tests/FT_App/run_test_basic.pl b/TAO/orbsvcs/tests/FT_App/run_test_basic.pl
index baa3fd93649..dea17745fb6 100755
--- a/TAO/orbsvcs/tests/FT_App/run_test_basic.pl
+++ b/TAO/orbsvcs/tests/FT_App/run_test_basic.pl
@@ -8,8 +8,32 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
use lib '../../../../bin';
use PerlACE::Run_Test;
-my($debug) = 1;
+########################
+#command line options
+#set defaults:
+my($verbose) = 0; # 1: report perl actions before executing them
+my($debug_builds) = 0; # 0: use exes from Release directories
+
+foreach $i (@ARGV) {
+ if ($i eq "--debug_build")
+ {
+ $debug_builds = 1;
+ }
+ elsif ($i eq "-v")
+ {
+ $verbose += 1;
+ }
+}
+
+my($build_directory) = "/Release";
+if ( $debug_builds ) {
+ $build_directory = "";
+}
+if ( $verbose > 1) {
+ print "verbose: $verbose\n";
+ print "debug_builds: $debug_builds -> $build_directory\n";
+}
my($factory1_ior) = PerlACE::LocalFile ("factory1.ior");
my($factory2_ior) = PerlACE::LocalFile ("factory2.ior");
@@ -24,15 +48,14 @@ unlink $replica2_ior;
unlink $data_file;
my($status) = 0;
-my($SV1) = new PerlACE::Process ("release/ft_replica", "-o $factory1_ior -t $replica1_ior -q -f none");
-my($SV2) = new PerlACE::Process ("release/ft_replica", "-o $factory2_ior -t $replica2_ior -q -f none");
-my($CL) = new PerlACE::Process ("release/ft_client", "-f file://$replica1_ior -f file://$replica2_ior -c testscript");
-#my($CL) = new PerlACE::Process ("release/ft_client", "-f file://$replica1_iogr -c testscript");
+my($SV1) = new PerlACE::Process ("./$build_directory/ft_replica", "-o $factory1_ior -t $replica1_ior -q -f none");
+my($SV2) = new PerlACE::Process ("./$build_directory/ft_replica", "-o $factory2_ior -t $replica2_ior -q -f none");
+my($CL) = new PerlACE::Process ("./$build_directory/ft_client", "-f file://$replica1_ior -f file://$replica2_ior -c testscript");
-print "\nTest: Starting replica 1 " . $SV1->CommandLine . "\n" if ($debug);
+print "\nTest: Starting replica 1 " . $SV1->CommandLine . "\n" if ($verbose);
$SV1->Spawn ();
-print "waiting for replica 1's IOR\n" if ($debug);
+print "waiting for replica 1's IOR\n" if ($verbose);
if (PerlACE::waitforfile_timed ($replica1_ior, 5) == -1) {
print STDERR "TEST ERROR: cannot find replica 1 file <$replica1_ior>\n";
@@ -40,10 +63,10 @@ if (PerlACE::waitforfile_timed ($replica1_ior, 5) == -1) {
exit 1;
}
-print "\nTest: Starting replica 2 " . $SV2->CommandLine . "\n" if ($debug);
+print "\nTest: Starting replica 2 " . $SV2->CommandLine . "\n" if ($verbose);
$SV2->Spawn ();
-print "waiting for replica 2's IOR\n" if ($debug);
+print "waiting for replica 2's IOR\n" if ($verbose);
if (PerlACE::waitforfile_timed ($replica2_ior, 5) == -1) {
print STDERR "TEST ERROR: cannot find replica 2 file <$replica2_ior>\n";
$SV1->Kill (); $SV1->TimedWait (1);
@@ -51,7 +74,7 @@ if (PerlACE::waitforfile_timed ($replica2_ior, 5) == -1) {
exit 1;
}
-print "\nTest: Starting client " . $CL->CommandLine . "\n" if ($debug);
+print "\nTest: Starting client " . $CL->CommandLine . "\n" if ($verbose);
$client = $CL->SpawnWaitKill (60);
@@ -60,10 +83,10 @@ if ($client != 0) {
$status = 1;
}
-print "wait for server 1.\n" if ($debug);
+print "wait for server 1.\n" if ($verbose);
$server = $SV1->WaitKill (60);
-print "wait for server 2.\n" if ($debug);
+print "wait for server 2.\n" if ($verbose);
$server = $SV2->WaitKill (60);
if ($server != 0) {
@@ -72,7 +95,7 @@ if ($server != 0) {
}
if ($status == 0) {
-print "Clean up scratch files\n" if ($debug);
+print "Clean up scratch files\n" if ($verbose);
unlink $factory1_ior;
unlink $factory2_ior;
diff --git a/TAO/orbsvcs/tests/FT_App/run_test_detector.pl b/TAO/orbsvcs/tests/FT_App/run_test_detector.pl
index 404730c74ad..f7886fb6dab 100755
--- a/TAO/orbsvcs/tests/FT_App/run_test_detector.pl
+++ b/TAO/orbsvcs/tests/FT_App/run_test_detector.pl
@@ -8,41 +8,43 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# Purpose:
# To test the FaultDetectorFactory and FaultDetectors
#
+# Command line options:
+# --debug_build use exes from this directory
+# if not specified use exes from ./release
+# -v display test progress messages (repeating option increases verbosity
+#
# Process being tested:
-# Fault_Detector
-# implements FaultDetectorFactory interface
-# implements PullMonitorable interface
+# Fault_Detector
+# implements FaultDetectorFactory interface
+# implements PullMonitorable interface
#
# Processes used in test:
-# FT_Replica
-# implements TestReplica interface.
-# implements PullMonitorable.
-# StubNotifier
-# implements FaultNotifier interface (as a stub.)
-# implements PullMonitorable.
-# client for FaultDetectorFactory interface.
-# FT_Client
-# client for TestReplica interface.
-# client for PullMonitorable.
+# FT_Replica
+# implements TestReplica interface.
+# implements PullMonitorable.
+# StubNotifier
+# implements FaultNotifier interface (as a stub.)
+# implements PullMonitorable.
+# client for FaultDetectorFactory interface.
+# FT_Client
+# client for TestReplica interface.
+# client for PullMonitorable.
#
# Test Scenario ( ***Test: marks behavior being tested):
-# Phase 1:
# Start two FT_Replicas
# FT_Replicas write TestReplica IORs (FR#1 and FR#2) to files
# Start the Fault_Detector
# Fault_Detector writes its IOR (FDF) to a file
-# Phase 2:
# Wait for IORs: FR#1, FR#2, and FDF
# Start the StubNotifier giving it IORS: FR#1, FR#2 and FDF
# StubNotifier calls FDF to create a FaultDetector
# for each Replica.
# StubNotifier writes FaultNotifier IOR (FN) to a file.
-# Phase 3:
# Wait for IOR: FN
-# Start FT_Client giving it IORS: FR#1 and FR#2. [1]
+# Start FT_Client giving it IORS: FR#1 and FR#2.
# FT_Client interacts with FR#1.
# FT_Client asks FR#1 to fault. It does so.
-# FT_Client notices fault and switches to FR#2. [1]
+# FT_Client notices fault and switches to FR#2.
# ***Test: FD#1 notices fault and notifies StubNotifier
# ***Test: FD#1 terminates
# FT_Client interacts with FR#2.
@@ -51,22 +53,21 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# ***Test: FD#2 notices FR2 is gone, interprets this
# as a fault, and notifies StubNotifier.
# ***Test: FD#2 terminates.
+# Shut down
# ***Test: FDF is idle, so it terminates.
# StubNotifier sees FDF terminate, so it terminates
-# Phase 4:
+# Cleanup
# Wait for all processes to terminate.
# Check termination status.
# Delete temp files.
#
-# [1] Client mediated fault tolerance. These points will
-# change when IOGR support is available.
use lib '../../../../bin';
use PerlACE::Run_Test;
########################
#command line options
#set defaults:
-my($verbose) = 0; # 1: report perl actions before executing them
+my($verbose) = 0; # 1: report perl actions before executing them; 2 display settings from command line
my($debug_builds) = 0; # 0: use exes from Release directories
my($simulated) = 1; # 1: use "client simulated" fault tolerance
@@ -75,10 +76,6 @@ foreach $i (@ARGV) {
{
$debug_builds = 1;
}
- elsif ($i eq "--no_simulate") # reverse this once we have FT ORB support
- {
- $simulated = 0;
- }
elsif ($i eq "-v")
{
$verbose += 1;
@@ -126,14 +123,7 @@ my($REP1) = new PerlACE::Process (".$build_directory/ft_replica", "-o $factory1_
my($REP2) = new PerlACE::Process (".$build_directory/ft_replica", "-o $factory2_ior -f none -t $replica2_ior -l loc2 -i type1 -q");
my($DET) = new PerlACE::Process ("$ENV{'TAO_ROOT'}/orbsvcs/Fault_Detector$build_directory/Fault_Detector", "$rm_initref -o $detector_ior -q");
my($NOT) = new PerlACE::Process (".$build_directory/ft_notifier", "-o $notifier_ior -q -d file://$detector_ior -r file://$replica1_ior -r file://$replica2_ior");
-my($CL);
-if ($simulated) {
- print "\nTEST: Preparing Client Mediated Fault Tolerance test.\n" if ($verbose);
- $CL = new PerlACE::Process (".$build_directory/ft_client", "-f file://$replica1_ior -f file://$replica2_ior -c testscript");
-}else{
- print "\nTEST: Preparing IOGR based test.\n" if ($verbose);
- $CL = new PerlACE::Process (".$build_directory/ft_client", "-f file://$replica1_iogr -c testscript");
-}
+my($CL) = new PerlACE::Process (".$build_directory/ft_client", "-f file://$replica1_ior -f file://$replica2_ior -c testscript");
print "TEST: starting replica1 ". $REP1->CommandLine . "\n" if ($verbose);
$REP1->Spawn ();
diff --git a/TAO/orbsvcs/tests/FT_App/run_test_notifier.pl b/TAO/orbsvcs/tests/FT_App/run_test_notifier.pl
index e3f1b14d1dd..521860b7ac3 100755
--- a/TAO/orbsvcs/tests/FT_App/run_test_notifier.pl
+++ b/TAO/orbsvcs/tests/FT_App/run_test_notifier.pl
@@ -6,45 +6,46 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# -*- perl -*-
# Purpose:
-# To test the FaultNotifier
+# To test the FaultNotifier
+#
+# Command line options:
+# --debug_build use exes from this directory
+# if not specified use exes from ./release
+# -v display test progress messages (repeating option increases verbosity
#
# Process being tested:
-# Fault_Notifier
-# implements FaultNotifier interface.
+# Fault_Notifier
+# implements FaultNotifier interface.
# Processes used in test:
-# FT_Replica
-# implements TestReplica interface.
-# implements PullMonitorable.
-# Fault_Detector
-# implements FaultDetectorFactory interface
-# implements PullMonitorable interface
-# FT_Client
-# client for TestReplica interface.
-# client for PullMonitorable.
-# StubAnalyzer
-# Subscribes to Fault_Notfier
+# FT_Replica
+# implements TestReplica interface.
+# implements PullMonitorable.
+# Fault_Detector
+# implements FaultDetectorFactory interface
+# implements PullMonitorable interface
+# FT_Client
+# client for TestReplica interface.
+# client for PullMonitorable.
+# StubAnalyzer
+# Subscribes to Fault_Notfier
#
# Test Scenario (***Test: marks behavior being tested):
-# Phase 1:
# Start two FT_Replicas
# FT_Replicas write TestReplica IORs (FR#1 and FR#2) to files
# Start the Fault_Detector
# Fault_Detector writes its IOR (FDF) to a file
# Start the Fault_Notifier
# Fault_Notifier writes its IOR (FN) to a file.
-# Phase 2:
-# Wait for IORs: FR#1, FR#2, FDF, and FN
# Start the StubAnalyzer giving it IORS: FR#1, FR#2 FDF, FN
# StubAnalyzer calls FDF to create a FaultDetector
# for each Replica.
# StubAnalyzer subscribes to Fault_Notifier
# StubAnalyzer writes dummy message(READY) to a file.
-# Phase 3:
# Wait for READY
-# Start FT_Client giving it IORS: FR#1 and FR#2. [1]
+# Start FT_Client giving it IORS: FR#1 and FR#2.
# FT_Client interacts with FR#1.
# FT_Client asks FR#1 to fault. It does so.
-# FT_Client notices fault and switches to FR#2. [1]
+# FT_Client notices fault and switches to FR#2.
# FD#1 notices fault and notifies Fault_Notifier
# FD#1 terminates
# ***Test: Fault_Notifier forwards notification to StubAnalyzer
@@ -57,21 +58,19 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# FD#2 terminates.
# ***Test: Fault_Notifier forwards notification to StubAnalyzer
# StubAnalyzer prints notification.
-# Phase 4: shutting down.
+# Shutting down.
# All FaultDetectors have terminated so the FaultDetectorFactory
# honors the "quit-on-idle" option on it's command line and exits.
# StubAnalyzer compares # fault notifications to # replicas. When
-# they match, it "knows" that the test is over, so it shuts down.
+# they match, it knows that the test is over, so it shuts down.
# As it does so, it disconnects its fault consumers from the FaultNotifier.
# FaultNotifier notices the last fault consumer disconnecting and exits because
# the "quit-on-idle" option was specified on the command line.
-# Phase 5: housekeeping
+# Housekeeping
# Wait for all processes to terminate.
# Check termination status.
# Delete temp files.
#
-# [1] Client mediated fault tolerance. These points will
-# change when IOGR support is available.
use lib '../../../../bin';
#use lib '$ENV{ACE_ROOT}/bin';
use PerlACE::Run_Test;
@@ -81,24 +80,18 @@ use PerlACE::Run_Test;
#set defaults:
my($verbose) = 0; # 1: report perl actions before executing them
my($debug_builds) = 0; # 0: use exes from Release directories
-my($simulated) = 1; # 1: use "client simulated" fault tolerance
foreach $i (@ARGV) {
if ($i eq "--debug_build")
{
$debug_builds = 1;
}
- elsif ($i eq "--no_simulate") # reverse this once we have FT ORB support
- {
- $simulated = 0;
- }
elsif ($i eq "-v")
{
$verbose += 1;
}
}
-
my($build_directory) = "/Release";
if ( $debug_builds ) {
$build_directory = "";
@@ -107,7 +100,6 @@ if ( $debug_builds ) {
if ( $verbose > 1) {
print "verbose: $verbose\n";
print "debug_builds: $debug_builds -> $build_directory\n";
- print "simulated: $simulated\n";
}
@@ -138,14 +130,7 @@ my($REP2) = new PerlACE::Process (".$build_directory/ft_replica", "-o $factory2_
my($DET) = new PerlACE::Process ("$ENV{'TAO_ROOT'}/orbsvcs/Fault_Detector$build_directory/Fault_Detector", "-r -o $detector_ior -q");
my($NOT) = new PerlACE::Process ("$ENV{'TAO_ROOT'}/orbsvcs/Fault_Notifier$build_directory/Fault_Notifier", "-r -o $notifier_ior -q");
my($ANA) = new PerlACE::Process (".$build_directory/ft_analyzer", "-o $ready_file -n file://$notifier_ior -d file://$detector_ior -r file://$replica1_ior -r file://$replica2_ior -q");
-
-my($CL);
-if (simulated) {
- $CL = new PerlACE::Process (".$build_directory/ft_client", "-f file://$replica1_ior -f file://$replica2_ior -c testscript");
-}else{
- #todo figure out how to get iogr
- $CL = new PerlACE::Process (".$build_directory/ft_client", "-f file://$replica1_iogr -c testscript");
-}
+my($CL) = new PerlACE::Process (".$build_directory/ft_client", "-f file://$replica1_ior -f file://$replica2_ior -c testscript");
print "TEST: starting replica1 " . $REP1->CommandLine . "\n" if ($verbose);
$REP1->Spawn ();
diff --git a/TAO/orbsvcs/tests/FT_App/run_test_registry.pl b/TAO/orbsvcs/tests/FT_App/run_test_registry.pl
index e94f7427201..dd73b739a52 100755
--- a/TAO/orbsvcs/tests/FT_App/run_test_registry.pl
+++ b/TAO/orbsvcs/tests/FT_App/run_test_registry.pl
@@ -6,11 +6,23 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# -*- perl -*-
# Purpose:
-# To test the FactoryRegistry
+# To test the FactoryRegistry either as a stand-alone application or as part
+# of the replication manager
+#
+# Command line options:
+# --debug_build use exes from this directory
+# if not specified use exes from ./release
+# -r use ReplicationManager rather than stand-alone factory
+# --no_simulate
+# use real IOGR-based recovery.
+# -v display test progress messages (repeating option increases verbosity
#
# Process being tested:
# FT_Registry
# implements PortableGroup::FactoryRegistry interface.
+# or
+# FT_ReplicationManager (if -r option is used)
+#
# Processes used in test:
# FT_Replica * 3
# implements GenericFactory interface to create TestReplicas
@@ -92,12 +104,17 @@ use PerlACE::Run_Test;
my($verbose) = 0; # 1: report perl actions before executing them
my($debug_builds) = 0; # 0: use exes from Release directories
my($simulated) = 1; # 1: use "client simulated" fault tolerance
+my($use_rm) = 0; # 1: use replication manager; 0 use stand-alone factory registry
foreach $i (@ARGV) {
if ($i eq "--debug_build")
{
$debug_builds = 1;
}
+ elsif ($i eq "-r") # use RegistrationManager
+ {
+ $use_rm = 1
+ }
elsif ($i eq "--no_simulate") # reverse this once we have FT ORB support
{
$simulated = 0;
@@ -106,6 +123,11 @@ foreach $i (@ARGV) {
{
$verbose += 1;
}
+ else
+ {
+ print "unknown option $i. Expecting: --debug_build, -r --no_simulate, -v\n";
+ exit(-1);
+ }
}
my($build_directory) = "/Release";
@@ -128,6 +150,7 @@ my($location3) = "rivendell";
my($location4) = "rohan";
#define temp files
+my($rm_ior) = PerlACE::LocalFile ("rm.ior");
my($registry_ior) = PerlACE::LocalFile ("registry.ior");
my($factory1_ior) = PerlACE::LocalFile ("factory1.ior");
my($factory2_ior) = PerlACE::LocalFile ("factory2.ior");
@@ -146,6 +169,7 @@ my($replica3_iogr) = PerlACE::LocalFile ("${species1}_2.iogr");
my($client_data) = PerlACE::LocalFile ("persistent.dat");
#discard junk from previous tests
+unlink $rm_ior;
unlink $registry_ior;
unlink $factory1_ior;
unlink $factory2_ior;
@@ -163,24 +187,34 @@ unlink $client_data;
my($status) = 0;
+my ($rm_endpoint) = "-ORBEndpoint iiop://localhost:2833";
+my ($registry_opt) = "-f file://$registry_ior";
+
+if ($use_rm) {
+ $registry_opt = "-ORBInitRef ReplicationManager=corbaloc::localhost:2833/ReplicationManager";
+}
+
+my($RM) = new PerlACE::Process ("$ENV{'TAO_ROOT'}/orbsvcs/FT_ReplicationManager$build_directory/FT_ReplicationManager", "-ORBDebugLevel 0 -o $rm_ior $rm_endpoint");
+my($RMC) = new PerlACE::Process (".$build_directory/replmgr_controller", "$registry_opt -x");
my($REG) = new PerlACE::Process (".$build_directory/ft_registry", "-o $registry_ior -q");
-my($FAC1) = new PerlACE::Process (".$build_directory/ft_replica", "-o $factory1_ior -f file://$registry_ior -l $location1 -i $species1 -q");
-my($FAC2) = new PerlACE::Process (".$build_directory/ft_replica", "-o $factory2_ior -f file://$registry_ior -l $location2 -i $species1 -i $species2 -i $species3 -q -u");
-my($FAC3) = new PerlACE::Process (".$build_directory/ft_replica", "-o $factory3_ior -f file://$registry_ior -l $location3 -i $species2 -q -u");
-# resolve factory IOR as file: url
-#my($CTR) = new PerlACE::Process (".$build_directory/ft_create", "-f file://$registry_ior -r $species1 -r $species2 -r $species1 -u $species3");
-# -n means no name service -i means write individual iors
-my($CTR) = new PerlACE::Process (".$build_directory/ft_create", "-f file://$registry_ior -r $species1 -r $species2 -r $species1 -u $species3 -n -i");
+my($FAC1) = new PerlACE::Process (".$build_directory/ft_replica", "-o $factory1_ior $registry_opt -l $location1 -i $species1 -q");
+my($FAC2) = new PerlACE::Process (".$build_directory/ft_replica", "-o $factory2_ior $registry_opt -l $location2 -i $species1 -i $species2 -i $species3 -q -u");
+my($FAC3) = new PerlACE::Process (".$build_directory/ft_replica", "-o $factory3_ior $registry_opt -l $location3 -i $species2 -q -u");
+ # -n means no name service -i means write individual iors
+my($CTR) = new PerlACE::Process (".$build_directory/ft_create", "$registry_opt -r $species1 -r $species2 -r $species1 -u $species3 -n -i");
my($CL1);
my($CL2);
my($CL3);
-if ($simulated) {
+if ($simulated)
+{
print "\nTEST: Preparing Client Mediated Fault Tolerance test.\n" if ($verbose);
$CL1 = new PerlACE::Process (".$build_directory/ft_client", "-f file://$replica1_ior -f file://$replica2_ior -c testscript");
$CL2 = new PerlACE::Process (".$build_directory/ft_client", "-f file://$replica3_ior -f file://$replica4_ior -c testscript");
$CL3 = new PerlACE::Process (".$build_directory/ft_client", "-f file://$replica5_ior -f file://$replica6_ior -c testscript");
-}else{
+}
+else
+{
print "\nTEST: Preparing IOGR based test.\n" if ($verbose);
$CL1 = new PerlACE::Process (".$build_directory/ft_client", "-f file://$replica1_iogr -c testscript");
$CL2 = new PerlACE::Process (".$build_directory/ft_client", "-f file://$replica2_iogr -c testscript");
@@ -189,15 +223,29 @@ if ($simulated) {
#######################
# Start FactoryRegistry
-
-print "\nTEST: starting registry " . $REG->CommandLine . "\n" if ($verbose);
-$REG->Spawn ();
-
-print "TEST: waiting for registry's IOR\n" if ($verbose);
-if (PerlACE::waitforfile_timed ($registry_ior, 5) == -1) {
- print STDERR "TEST ERROR: cannot find file <$registry_ior>\n";
- $REG->Kill (); $REG->TimedWait (1);
- exit 1;
+if ($use_rm)
+{
+ print "\nTEST: starting ReplicationManager " . $RM->CommandLine . "\n" if ($verbose);
+ $RM->Spawn ();
+
+ print "TEST: waiting for registry's IOR\n" if ($verbose);
+ if (PerlACE::waitforfile_timed ($rm_ior, 5) == -1) {
+ print STDERR "TEST ERROR: cannot find file <$rm_ior>\n";
+ $RM->Kill (); $RM->TimedWait (1);
+ exit 1;
+ }
+}
+else
+{
+ print "\nTEST: starting registry " . $REG->CommandLine . "\n" if ($verbose);
+ $REG->Spawn ();
+
+ print "TEST: waiting for registry's IOR\n" if ($verbose);
+ if (PerlACE::waitforfile_timed ($registry_ior, 5) == -1) {
+ print STDERR "TEST ERROR: cannot find file <$registry_ior>\n";
+ $REG->Kill (); $REG->TimedWait (1);
+ exit 1;
+ }
}
#################
@@ -343,14 +391,34 @@ if ($factory3 != 0) {
$status = 1;
}
-print "\nTEST: wait for FactoryRegistry.\n" if ($verbose);
-$registry = $REG->WaitKill (30);
-if ($registry != 0) {
- print STDERR "TEST ERROR: FactoryRegistry returned $registry\n";
- $status = 1;
-}
+if ($use_rm)
+{
+ print "\nTEST: shutting down the replication manager.\n" if ($verbose);
+ $controller = $RMC->SpawnWaitKill (300);
+ if ($controller != 0) {
+ print STDERR "TEST ERROR: replication manager controller returned $controller\n";
+ $status = 1;
+ }
+ print "\nTEST: wait for ReplicationManager.\n" if ($verbose);
+ #$RM->Kill ();
+ $repmgr = $RM->WaitKill (30);
+ if ($repmgr != 0) {
+ print STDERR "TEST ERROR: ReplicationManager returned $repmgr\n";
+ $status = 1;
+ }
+}
+else
+{
+ print "\nTEST: wait for FactoryRegistry.\n" if ($verbose);
+ $registry = $REG->WaitKill (30);
+ if ($registry != 0) {
+ print STDERR "TEST ERROR: FactoryRegistry returned $registry\n";
+ $status = 1;
+ }
+}
print "\nTEST: releasing scratch files.\n" if ($verbose);
+unlink $rm_ior;
unlink $registry_ior;
unlink $factory1_ior;
unlink $factory2_ior;