From ae847ff13be88bdda7ed157b43de1219aaca9dab Mon Sep 17 00:00:00 2001 From: pradeep Date: Tue, 10 Jun 2003 15:47:17 +0000 Subject: ChangeLogTag: Sun Jun 8 19:53:04 2003 Pradeep Gore --- TAO/orbsvcs/tests/Notify/Lanes/consumer.conf | 13 +++++++------ TAO/orbsvcs/tests/Notify/Lanes/run_test_consumer.pl | 8 ++++---- TAO/orbsvcs/tests/Notify/Lanes/run_test_notify.pl | 8 ++++---- TAO/orbsvcs/tests/Notify/Lanes/run_test_supplier.pl | 8 ++++---- TAO/orbsvcs/tests/Notify/Lanes/supplier.conf | 14 +++++++------- TAO/orbsvcs/tests/Notify/ThreadPool/consumer.conf | 16 ++++++++++++---- TAO/orbsvcs/tests/Notify/ThreadPool/run_test.pl | 5 +++-- TAO/orbsvcs/tests/Notify/ThreadPool/supplier.conf | 6 +++--- TAO/orbsvcs/tests/Notify/lib/Driver.cpp | 16 ++++++---------- TAO/orbsvcs/tests/Notify/lib/Periodic_Consumer.cpp | 19 ++++++++++--------- 10 files changed, 60 insertions(+), 53 deletions(-) diff --git a/TAO/orbsvcs/tests/Notify/Lanes/consumer.conf b/TAO/orbsvcs/tests/Notify/Lanes/consumer.conf index d8e03ffc383..4b5a53e862f 100644 --- a/TAO/orbsvcs/tests/Notify/Lanes/consumer.conf +++ b/TAO/orbsvcs/tests/Notify/Lanes/consumer.conf @@ -16,7 +16,7 @@ dynamic TAO_NS_RT_POA_Command_Factory Service_Object* TAO_RT_NotifyTests:_make_T static Command_Builder "Application -Init" ##----------- Create an RT POA to host local consumer objects----------- -static Command_Builder "POA -Create poa_1 -PriorityModel CLIENT 1 -ThreadPoolLanes 3 -Lane 1 1 0 -Lane 2 1 0 -Lane 3 1 0" +static Command_Builder "POA -Create poa_1 -PriorityModel CLIENT 1 -ThreadPoolLanes 4 -Lane 0 1 0 -Lane 1 1 0 -Lane 2 1 0 -Lane 3 1 0" ##--------- Consumer Admin 1 ------------- static Command_Builder "ConsumerAdmin -Create ca1 ec1 -AND_OP" @@ -27,9 +27,9 @@ static Command_Builder "PeriodicConsumer -Subscription c1 +Path1" static Command_Builder "Filter -CreateFilter f_c1 ff" static Command_Builder "Filter -Add_Constraint f_c1 'PoolId = 1'" -static Command_Builder "Filter -Add_Constraint f_c1 'LaneId = 0'" +static Command_Builder "Filter -Add_Constraint f_c1 'LaneId = 1'" -static Command_Builder "Filter -Add_Filter f_c1 c1_proxy" +#static Command_Builder "Filter -Add_Filter f_c1 c1_proxy" ##--------- Consumer 2 , connected to CA 1 -------- static Command_Builder "PeriodicConsumer -Create c2 -Admin ca1 -POA poa_1 -Proxy c2_proxy -MaxCount 5 -Check_Priority" @@ -37,17 +37,18 @@ static Command_Builder "PeriodicConsumer -Subscription c2 +Path2" static Command_Builder "Filter -CreateFilter f_c2 ff" static Command_Builder "Filter -Add_Constraint f_c2 'PoolId = 1'" -static Command_Builder "Filter -Add_Constraint f_c2 'LaneId = 1'" +static Command_Builder "Filter -Add_Constraint f_c2 'LaneId = 2'" -static Command_Builder "Filter -Add_Filter f_c2 c2_proxy" +#static Command_Builder "Filter -Add_Filter f_c2 c2_proxy" ##--------- Consumer 3 , connected to CA 1 -------- static Command_Builder "PeriodicConsumer -Create c3 -Admin ca1 -POA poa_1 -Proxy c3_proxy -MaxCount 5 -Check_Priority" + static Command_Builder "PeriodicConsumer -Subscription c3 +Path3" static Command_Builder "Filter -CreateFilter f_c3 ff" static Command_Builder "Filter -Add_Constraint f_c3 'PoolId = 1'" -static Command_Builder "Filter -Add_Constraint f_c3 'LaneId = 2'" +static Command_Builder "Filter -Add_Constraint f_c3 'LaneId = 3'" static Command_Builder "Filter -Add_Filter f_c3 c3_proxy" diff --git a/TAO/orbsvcs/tests/Notify/Lanes/run_test_consumer.pl b/TAO/orbsvcs/tests/Notify/Lanes/run_test_consumer.pl index dce441fd4dc..a0dbfbe696f 100755 --- a/TAO/orbsvcs/tests/Notify/Lanes/run_test_consumer.pl +++ b/TAO/orbsvcs/tests/Notify/Lanes/run_test_consumer.pl @@ -8,8 +8,8 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' use lib "../../../../../bin"; use PerlACE::Run_Test; -$experiment_timeout = 60; -$startup_timeout = 60; +$experiment_timeout = 600; +$startup_timeout = 600; $notify_conf = PerlACE::LocalFile ("notify.conf"); $notify_ior = PerlACE::LocalFile ("notify.ior"); $naming_ior = PerlACE::LocalFile ("naming.ior"); @@ -20,8 +20,8 @@ $status = 0; $Consumer = new PerlACE::Process ("../Driver/Notify_Tests_Driver"); -$Consumer_Args = "-ORBInitRef NameService=file://$naming_ior -IORinput file://$supplier_ior -ORBSvcConf $consumer_conf"; -#$Consumer_Args = "-ORBInitRef NameService=file://$naming_ior -IORinput file://$supplier_ior -ORBSvcConf $consumer_conf -ORBDebugLevel 1"; +#$Consumer_Args = "-ORBInitRef NameService=file://$naming_ior -IORinput file://$supplier_ior -ORBSvcConf $consumer_conf"; +$Consumer_Args = "-ORBInitRef NameService=file://$naming_ior -IORinput file://$supplier_ior -ORBSvcConf $consumer_conf -ORBDebugLevel 1"; if (PerlACE::waitforfile_timed ($supplier_ior, $startup_timeout) == -1) { print STDERR "ERROR: waiting for the supplier to start\n"; diff --git a/TAO/orbsvcs/tests/Notify/Lanes/run_test_notify.pl b/TAO/orbsvcs/tests/Notify/Lanes/run_test_notify.pl index bd0015d3dbd..28289b96e22 100755 --- a/TAO/orbsvcs/tests/Notify/Lanes/run_test_notify.pl +++ b/TAO/orbsvcs/tests/Notify/Lanes/run_test_notify.pl @@ -8,8 +8,8 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' use lib "../../../../../bin"; use PerlACE::Run_Test; -$experiment_timeout = 60; -$startup_timeout = 60; +$experiment_timeout = 600; +$startup_timeout = 600; $notify_conf = PerlACE::LocalFile ("notify.conf"); $notify_ior = PerlACE::LocalFile ("notify.ior"); $naming_ior = PerlACE::LocalFile ("naming.ior"); @@ -20,8 +20,8 @@ $Naming = new PerlACE::Process ("../../../Naming_Service/Naming_Service", $Notification = new PerlACE::Process ("../../../Notify_Service/Notify_Service"); -$Notify_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $notify_ior -ORBSvcConf $notify_conf"; -#$Notify_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $notify_ior -ORBSvcConf $notify_conf -ORBDebugLevel 1"; +#$Notify_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $notify_ior -ORBSvcConf $notify_conf"; +$Notify_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $notify_ior -ORBSvcConf $notify_conf -ORBDebugLevel 1"; unlink $naming_ior; $Naming->Spawn (); diff --git a/TAO/orbsvcs/tests/Notify/Lanes/run_test_supplier.pl b/TAO/orbsvcs/tests/Notify/Lanes/run_test_supplier.pl index 5ac9330cab4..38c7449268d 100755 --- a/TAO/orbsvcs/tests/Notify/Lanes/run_test_supplier.pl +++ b/TAO/orbsvcs/tests/Notify/Lanes/run_test_supplier.pl @@ -8,8 +8,8 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' use lib "../../../../../bin"; use PerlACE::Run_Test; -$experiment_timeout = 60; -$startup_timeout = 60; +$experiment_timeout = 600; +$startup_timeout = 600; $notify_ior = PerlACE::LocalFile ("notify.ior"); $naming_ior = PerlACE::LocalFile ("naming.ior"); $supplier_ior = PerlACE::LocalFile ("supplier.ior"); @@ -19,8 +19,8 @@ $status = 0; $Supplier = new PerlACE::Process ("../Driver/Notify_Tests_Driver"); -$Supplier_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $supplier_ior -ORBSvcConf $supplier_conf"; -#$Supplier_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $supplier_ior -ORBSvcConf $supplier_conf -ORBDebugLevel 1"; +#$Supplier_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $supplier_ior -ORBSvcConf $supplier_conf"; +$Supplier_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $supplier_ior -ORBSvcConf $supplier_conf -ORBDebugLevel 1"; if (PerlACE::waitforfile_timed ($notify_ior, $startup_timeout) == -1) { print STDERR "ERROR: waiting for the notify service to start\n"; diff --git a/TAO/orbsvcs/tests/Notify/Lanes/supplier.conf b/TAO/orbsvcs/tests/Notify/Lanes/supplier.conf index 2b26c538bbb..0910a40c30b 100644 --- a/TAO/orbsvcs/tests/Notify/Lanes/supplier.conf +++ b/TAO/orbsvcs/tests/Notify/Lanes/supplier.conf @@ -26,7 +26,7 @@ static Command_Builder "Application -Init" ##------- Create Event Channel --------------- static Command_Builder "EventChannel -Create ec1 NotifyEventChannelFactory" -static Command_Builder "EventChannel -Set_QoS ec1 -ThreadPoolLanes 3 -Lane 1 1 0 -Lane 2 1 0 -Lane 3 1 0" +static Command_Builder "EventChannel -Set_QoS ec1 -ThreadPoolLanes 4 -Lane 0 1 0 -Lane 1 1 0 -Lane 2 1 0 -Lane 3 1 0" static Command_Builder "Filter -CreateFactory ff ec1" ### --- Create Supplier Admin 1 ---- @@ -37,23 +37,23 @@ static Command_Builder "PeriodicSupplier -Create s1 -Admin sa1 -Proxy s1_proxy - static Command_Builder "Filter -CreateFilter f1 ff" static Command_Builder "Filter -Add_Constraint f1 'PoolId = 1'" -static Command_Builder "Filter -Add_Constraint f1 'LaneId = 0'" -static Command_Builder "Filter -Add_Filter f1 s1_proxy" +static Command_Builder "Filter -Add_Constraint f1 'LaneId = 1'" +#static Command_Builder "Filter -Add_Filter f1 s1_proxy" ### --- Create Supplier s2 connected to sa1 ---- static Command_Builder "PeriodicSupplier -Create s2 -Admin sa1 -Proxy s2_proxy -EventType Path2 -Priority 2 -Period 10000 -ExecTime 10000 -Phase 0 -Iter 5 -Load 1 " static Command_Builder "Filter -CreateFilter f2 ff" static Command_Builder "Filter -Add_Constraint f2 'PoolId = 1'" -static Command_Builder "Filter -Add_Constraint f2 'LaneId = 1'" -static Command_Builder "Filter -Add_Filter f2 s2_proxy" +static Command_Builder "Filter -Add_Constraint f2 'LaneId = 2'" +#static Command_Builder "Filter -Add_Filter f2 s2_proxy" ### --- Create Supplier s3 connected to sa2 ---- static Command_Builder "PeriodicSupplier -Create s3 -Admin sa1 -Proxy s3_proxy -EventType Path3 -Priority 3 -Period 10000 -ExecTime 10000 -Phase 0 -Iter 5 -Load 1 " static Command_Builder "Filter -CreateFilter f3 ff" static Command_Builder "Filter -Add_Constraint f3 'PoolId = 1'" -static Command_Builder "Filter -Add_Constraint f3 'LaneId = 2'" -static Command_Builder "Filter -Add_Filter f3 s3_proxy" +static Command_Builder "Filter -Add_Constraint f3 'LaneId = 3'" +#static Command_Builder "Filter -Add_Filter f3 s3_proxy" ##--------- Run ------------- static Command_Builder "Application -WaitToStart" diff --git a/TAO/orbsvcs/tests/Notify/ThreadPool/consumer.conf b/TAO/orbsvcs/tests/Notify/ThreadPool/consumer.conf index d9dd3ec07ca..c172ee1964a 100644 --- a/TAO/orbsvcs/tests/Notify/ThreadPool/consumer.conf +++ b/TAO/orbsvcs/tests/Notify/ThreadPool/consumer.conf @@ -7,7 +7,7 @@ dynamic TAO_NS_ConsumerAdmin_Command_Factory Service_Object *TAO_NotifyTests:_ma dynamic TAO_NS_Periodic_Consumer_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_NS_Periodic_Consumer_Command_Factory () "" -dynamic TAO_NS_Filter_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_NS_Filter_Command_Factory () "" +dynamic TAO_NS_Filter_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_NS_Filter_Command_Factory () "" dynamic TAO_NS_RT_POA_Command_Factory Service_Object* TAO_RT_NotifyTests:_make_TAO_NS_RT_POA_Command_Factory () "" @@ -22,13 +22,19 @@ static Command_Builder "ConsumerAdmin -Create ca1 ec1 -AND_OP" static Command_Builder "ConsumerAdmin -Set_QoS ca1 -ThreadPool -Threads 1 -Priority 5" ##--------- Consumer 1 , connected to CA 1 -------- -static Command_Builder "PeriodicConsumer -Create c1 ca1 -POA poa_1 -Set_QoS -ThreadPool -Threads 1 -Priority 5 -Proxy c1_proxy -MaxCount 15 -Check_Priority" +static Command_Builder "PeriodicConsumer -Create c1 -Admin ca1 -POA poa_1 -Set_QoS -ThreadPool -Threads 1 -Priority 5 -Proxy c1_proxy -MaxCount 5 -Check_Priority" + +static Command_Builder "PeriodicConsumer -Subscription c1 +Path1" + static Command_Builder "Filter -CreateFilter f_c1 ff" static Command_Builder "Filter -Add_Constraint f_c1 'PoolId = 5'" static Command_Builder "Filter -Add_Filter f_c1 c1_proxy" ##--------- Consumer 2 , connected to CA 1 -------- -static Command_Builder "PeriodicConsumer -Create c2 ca1 -POA poa_1 -Proxy c2_proxy -MaxCount 15 -Check_Priority" +static Command_Builder "PeriodicConsumer -Create c2 -Admin ca1 -POA poa_1 -Proxy c2_proxy -MaxCount 5 -Check_Priority" + +static Command_Builder "PeriodicConsumer -Subscription c2 +Path2" + static Command_Builder "Filter -CreateFilter f_c2 ff" static Command_Builder "Filter -Add_Constraint f_c2 'PoolId = 4'" static Command_Builder "Filter -Add_Filter f_c2 c2_proxy" @@ -37,7 +43,9 @@ static Command_Builder "Filter -Add_Filter f_c2 c2_proxy" static Command_Builder "ConsumerAdmin -Create ca2 ec1 -AND_OP" ##--------- Consumer 3 , connected to CA 2 -------- -static Command_Builder "PeriodicConsumer -Create c3 ca2 -POA poa_1 -Proxy c3_proxy -MaxCount 15 -Check_Priority" +static Command_Builder "PeriodicConsumer -Create c3 -Admin ca2 -POA poa_1 -Proxy c3_proxy -MaxCount 5 -Check_Priority" + +static Command_Builder "PeriodicConsumer -Subscription c3 +Path3" static Command_Builder "Filter -CreateFilter f_c3 ff" static Command_Builder "Filter -Add_Constraint f_c3 'PoolId = 1'" diff --git a/TAO/orbsvcs/tests/Notify/ThreadPool/run_test.pl b/TAO/orbsvcs/tests/Notify/ThreadPool/run_test.pl index ad483a8cd55..b603ff03d6b 100755 --- a/TAO/orbsvcs/tests/Notify/ThreadPool/run_test.pl +++ b/TAO/orbsvcs/tests/Notify/ThreadPool/run_test.pl @@ -8,8 +8,8 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' use lib "../../../../../bin"; use PerlACE::Run_Test; -$experiment_timeout = 60; -$startup_timeout = 60; +$experiment_timeout = 600; +$startup_timeout = 600; $notify_conf = PerlACE::LocalFile ("notify.conf"); $notify_ior = PerlACE::LocalFile ("notify.ior"); $naming_ior = PerlACE::LocalFile ("naming.ior"); @@ -32,6 +32,7 @@ $Supplier_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $supplie $Consumer = new PerlACE::Process ("../Driver/Notify_Tests_Driver"); $Consumer_Args = "-ORBInitRef NameService=file://$naming_ior -IORinput file://$supplier_ior -ORBSvcConf $consumer_conf"; +#$Consumer_Args = "-ORBInitRef NameService=file://$naming_ior -IORinput file://$supplier_ior -ORBSvcConf $consumer_conf -ORBDebugLevel 1"; unlink $naming_ior; $Naming->Spawn (); diff --git a/TAO/orbsvcs/tests/Notify/ThreadPool/supplier.conf b/TAO/orbsvcs/tests/Notify/ThreadPool/supplier.conf index b9ffe13d970..d22cc5295d3 100644 --- a/TAO/orbsvcs/tests/Notify/ThreadPool/supplier.conf +++ b/TAO/orbsvcs/tests/Notify/ThreadPool/supplier.conf @@ -34,14 +34,14 @@ static Command_Builder "SupplierAdmin -Create sa1 ec1 -AND_OP" static Command_Builder "SupplierAdmin -Set_QoS sa1 -ThreadPool -Threads 1 -Priority 2" ### --- Create Supplier s1 connected to sa1. It has its own Thread ---- -static Command_Builder "PeriodicSupplier -Create s1 sa1 -Set_QoS -ThreadPool -Threads 1 -Priority 5 -Proxy s1_proxy -Priority 1 -Period 10000 -ExecTime 10000 -Phase 0 -Iter 5 -Load 1 " +static Command_Builder "PeriodicSupplier -Create s1 -Admin sa1 -Set_QoS -ThreadPool -Threads 1 -Priority 5 -Proxy s1_proxy -EventType Path1 -Priority 1 -Period 10000 -ExecTime 10000 -Phase 0 -Iter 5 -Load 1 " static Command_Builder "Filter -CreateFilter f1 ff" static Command_Builder "Filter -Add_Constraint f1 'PoolId = 3'" static Command_Builder "Filter -Add_Filter f1 s1_proxy" ### --- Create Supplier s2 connected to sa1 ---- -static Command_Builder "PeriodicSupplier -Create s2 sa1 -Proxy s2_proxy -Priority 3 -Period 10000 -ExecTime 10000 -Phase 0 -Iter 5 -Load 1 " +static Command_Builder "PeriodicSupplier -Create s2 -Admin sa1 -Proxy s2_proxy -EventType Path2 -Priority 3 -Period 10000 -ExecTime 10000 -Phase 0 -Iter 5 -Load 1 " static Command_Builder "Filter -CreateFilter f2 ff" static Command_Builder "Filter -Add_Constraint f2 'PoolId = 2'" @@ -51,7 +51,7 @@ static Command_Builder "Filter -Add_Filter f2 s2_proxy" static Command_Builder "SupplierAdmin -Create sa2 ec1 -AND_OP" ### --- Create Supplier s3 connected to sa2 ---- -static Command_Builder "PeriodicSupplier -Create s3 sa2 -Proxy s3_proxy -Priority 6 -Period 10000 -ExecTime 10000 -Phase 0 -Iter 5 -Load 1 " +static Command_Builder "PeriodicSupplier -Create s3 -Admin sa2 -Proxy s3_proxy -EventType Path3 -Priority 6 -Period 10000 -ExecTime 10000 -Phase 0 -Iter 5 -Load 1 " static Command_Builder "Filter -CreateFilter f3 ff" static Command_Builder "Filter -Add_Constraint f3 'PoolId = 1'" static Command_Builder "Filter -Add_Filter f3 s3_proxy" diff --git a/TAO/orbsvcs/tests/Notify/lib/Driver.cpp b/TAO/orbsvcs/tests/Notify/lib/Driver.cpp index 0cbf2e470e2..c38a5879666 100644 --- a/TAO/orbsvcs/tests/Notify/lib/Driver.cpp +++ b/TAO/orbsvcs/tests/Notify/lib/Driver.cpp @@ -215,7 +215,11 @@ TAO_NS_Driver::run (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) this->orb_->orb_core ()->orb_params ()->thread_creation_flags (); // Become an active object. - if (this->worker_.activate (flags) == -1) + int priority = ACE_Sched_Params::priority_min (this->orb_->orb_core ()->orb_params ()->sched_policy () + , this->orb_->orb_core ()->orb_params ()->scope_policy ()); + + // Become an active object. + if (this->worker_.activate (flags, 1, 0, priority) == -1) { if (ACE_OS::last_error () == EPERM) ACE_ERROR ((LM_ERROR, @@ -229,16 +233,8 @@ TAO_NS_Driver::run (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) } - this->orb_->run (0); - - ACE_DEBUG ((LM_ERROR, "Waiting for worker thread to end\n")); - - // Wait till we're done. - this->worker_.thr_mgr ()->wait (); - return; - // Activate the ORB run worker. - if (this->orb_run_worker_.activate (flags) == -1) + if (this->orb_run_worker_.activate (flags, 1, 0, priority) == -1) { if (ACE_OS::last_error () == EPERM) ACE_ERROR ((LM_ERROR, diff --git a/TAO/orbsvcs/tests/Notify/lib/Periodic_Consumer.cpp b/TAO/orbsvcs/tests/Notify/lib/Periodic_Consumer.cpp index 1ace1e5fe8c..182c8015e8e 100644 --- a/TAO/orbsvcs/tests/Notify/lib/Periodic_Consumer.cpp +++ b/TAO/orbsvcs/tests/Notify/lib/Periodic_Consumer.cpp @@ -97,20 +97,18 @@ TAO_NS_Periodic_Consumer::handle_start_event (const CosNotification::PropertySeq ACE_OS::strcmp (prop_seq[i].name.in (), "MaxCount") == 0) { prop_seq[i].value >>= this->max_count_; - - if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, "(%P, %t) Setting Maxcount = %d\n", - this->max_count_)); } else if (ACE_OS::strcmp (prop_seq[i].name.in (), "Load") == 0) { prop_seq[i].value >>= this->load_; - - if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, "(%P, %t) Setting Load = %d\n", - this->load_)); } } + + if (TAO_debug_level > 0) + { + ACE_DEBUG ((LM_DEBUG, "(%P, %t) Maxcount = %d, Load = %d\n", + this->max_count_, this->load_)); + } } void @@ -246,7 +244,10 @@ TAO_NS_Periodic_Consumer::push_structured_event (const CosNotification::Structur if (this->client_) this->client_->done (this); - } + + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, "(%P, %t)Consumer %s done \n", this->name_.c_str ())); + } } void -- cgit v1.2.1