diff options
Diffstat (limited to 'TAO/orbsvcs/tests/Notify/Basic/ConnectDisconnect.cpp')
-rw-r--r-- | TAO/orbsvcs/tests/Notify/Basic/ConnectDisconnect.cpp | 44 |
1 files changed, 9 insertions, 35 deletions
diff --git a/TAO/orbsvcs/tests/Notify/Basic/ConnectDisconnect.cpp b/TAO/orbsvcs/tests/Notify/Basic/ConnectDisconnect.cpp index f3087187a05..f1cda8b802c 100644 --- a/TAO/orbsvcs/tests/Notify/Basic/ConnectDisconnect.cpp +++ b/TAO/orbsvcs/tests/Notify/Basic/ConnectDisconnect.cpp @@ -84,11 +84,9 @@ ConnectDisconnect::init (int argc, Notify_Test_Client::init (argc, argv ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1);; // Create all participants. - this->create_EC (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + this->create_EC (); CosNotifyChannelAdmin::AdminID adminid; @@ -96,7 +94,6 @@ ConnectDisconnect::init (int argc, ec_->new_for_suppliers (this->ifgop_, adminid ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1);; ACE_ASSERT (!CORBA::is_nil (supplier_admin_.in ())); @@ -104,7 +101,6 @@ ConnectDisconnect::init (int argc, ec_->new_for_consumers (this->ifgop_, adminid ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); ACE_ASSERT (!CORBA::is_nil (consumer_admin_.in ())); @@ -188,7 +184,7 @@ ConnectDisconnect::parse_args(int argc, char *argv[]) } void -ConnectDisconnect::create_EC (ACE_ENV_SINGLE_ARG_DECL) +ConnectDisconnect::create_EC (void) { CosNotifyChannelAdmin::ChannelID id; @@ -196,13 +192,12 @@ ConnectDisconnect::create_EC (ACE_ENV_SINGLE_ARG_DECL) this->initial_admin_, id ACE_ENV_ARG_PARAMETER); - ACE_CHECK; ACE_ASSERT (!CORBA::is_nil (ec_.in ())); } void -ConnectDisconnect::run_test (ACE_ENV_SINGLE_ARG_DECL) +ConnectDisconnect::run_test (void) { for (int iterations = 0; iterations < count_; ++iterations) { @@ -216,10 +211,8 @@ ConnectDisconnect::run_test (ACE_ENV_SINGLE_ARG_DECL) i)); this->any_consumer_[i]->init (root_poa_.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; this->any_consumer_[i]->connect (this->consumer_admin_.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; // Create and connect Structured consumers. ACE_NEW (this->structured_consumer_[i], @@ -227,10 +220,8 @@ ConnectDisconnect::run_test (ACE_ENV_SINGLE_ARG_DECL) i)); this->structured_consumer_[i]->init (root_poa_.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; this->structured_consumer_[i]->connect (this->consumer_admin_.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; // Create and connect Sequence consumers. ACE_NEW (this->sequence_consumer_[i], @@ -238,7 +229,6 @@ ConnectDisconnect::run_test (ACE_ENV_SINGLE_ARG_DECL) i)); this->sequence_consumer_[i]->init (root_poa_.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; this->sequence_consumer_[i]->connect (this->consumer_admin_.in () ACE_ENV_ARG_PARAMETER); } @@ -250,10 +240,8 @@ ConnectDisconnect::run_test (ACE_ENV_SINGLE_ARG_DECL) i)); this->any_supplier_[i]->init (root_poa_.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; this->any_supplier_[i]->connect (this->supplier_admin_.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; // Create and connect Structured suppliers. ACE_NEW (this->structured_supplier_[i], @@ -261,10 +249,8 @@ ConnectDisconnect::run_test (ACE_ENV_SINGLE_ARG_DECL) i)); this->structured_supplier_[i]->init (root_poa_.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; this->structured_supplier_[i]->connect (this->supplier_admin_.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; // Create and connect Sequence suppliers. ACE_NEW (this->sequence_supplier_[i], @@ -272,54 +258,46 @@ ConnectDisconnect::run_test (ACE_ENV_SINGLE_ARG_DECL) i)); this->sequence_supplier_[i]->init (root_poa_.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; this->sequence_supplier_[i]->connect (this->supplier_admin_.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } for (i = 0; i < this->consumers_; ++i) { // Disconnnect Any consumers. - this->any_consumer_[i]->disconnect (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + this->any_consumer_[i]->disconnect (); // Disconnect Structured Consumers. this->structured_consumer_[i]->disconnect ( ACE_ENV_SINGLE_ARG_PARAMETER ); - ACE_CHECK; // Disconnect Sequence Consumers. this->sequence_consumer_[i]->disconnect ( ACE_ENV_SINGLE_ARG_PARAMETER ); - ACE_CHECK; } for (i = 0; i < this->suppliers_; ++i) { // Disconnnect Any suppliers. - this->any_supplier_[i]->disconnect (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + this->any_supplier_[i]->disconnect (); // Disconnect Structured Suppliers. this->structured_supplier_[i]->disconnect ( ACE_ENV_SINGLE_ARG_PARAMETER ); - ACE_CHECK; // Disconnect Sequence Suppliers. this->sequence_supplier_[i]->disconnect ( ACE_ENV_SINGLE_ARG_PARAMETER ); - ACE_CHECK; } } } void -ConnectDisconnect::end_test (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +ConnectDisconnect::end_test (void) { consumer_done( 0 ); } @@ -341,8 +319,7 @@ ConnectDisconnect::check_results (void) // Destroy the channel. ACE_DECLARE_NEW_CORBA_ENV; - this->ec_->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + this->ec_->destroy (); return 0; } @@ -362,13 +339,10 @@ main (int argc, char* argv[]) ACE_TRY_NEW_ENV { client.init (argc, argv ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - client.run_test (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + client.run_test (); - client.end_test (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + client.end_test (); } ACE_CATCH (CORBA::Exception, se) { |