diff options
Diffstat (limited to 'TAO/tests/MT_Timeout')
-rw-r--r-- | TAO/tests/MT_Timeout/Client_Task.cpp | 17 | ||||
-rw-r--r-- | TAO/tests/MT_Timeout/Client_Task.h | 4 | ||||
-rw-r--r-- | TAO/tests/MT_Timeout/Server_Task.cpp | 1 | ||||
-rw-r--r-- | TAO/tests/MT_Timeout/Sleep_Service.cpp | 2 | ||||
-rw-r--r-- | TAO/tests/MT_Timeout/Sleep_Service.h | 2 | ||||
-rw-r--r-- | TAO/tests/MT_Timeout/client.cpp | 10 | ||||
-rw-r--r-- | TAO/tests/MT_Timeout/server.cpp | 17 |
7 files changed, 14 insertions, 39 deletions
diff --git a/TAO/tests/MT_Timeout/Client_Task.cpp b/TAO/tests/MT_Timeout/Client_Task.cpp index 29bb6e0502d..0900694abce 100644 --- a/TAO/tests/MT_Timeout/Client_Task.cpp +++ b/TAO/tests/MT_Timeout/Client_Task.cpp @@ -54,16 +54,13 @@ Client_Task::svc (void) ACE_TRY { - this->validate_connection (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + this->validate_connection (); CORBA::Object_var object = this->orb_->resolve_initial_references ("PolicyCurrent" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; CORBA::PolicyCurrent_var policy_current = CORBA::PolicyCurrent::_narrow (object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; TimeBase::TimeT timeout_period = 10 * this->timeout_; @@ -76,17 +73,14 @@ Client_Task::svc (void) this->orb_->create_policy (Messaging::RELATIVE_RT_TIMEOUT_POLICY_TYPE, timeout_as_any ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; policy_current->set_policy_overrides (policy_list, CORBA::ADD_OVERRIDE ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; for (int i = 0; i != this->iterations_; ++i) { - int retval = this->one_iteration (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + int retval = this->one_iteration (); if (retval == 1) successful_calls++; @@ -119,14 +113,13 @@ Client_Task::svc (void) } void -Client_Task::validate_connection (ACE_ENV_SINGLE_ARG_DECL) +Client_Task::validate_connection (void) { ACE_TRY { for (int i = 0; i != 100; ++i) { (void) this->sleep_service_->go_to_sleep (0 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; } } ACE_CATCH (CORBA::TRANSIENT, ex) @@ -134,11 +127,10 @@ Client_Task::validate_connection (ACE_ENV_SINGLE_ARG_DECL) // Ignore transient exceptions } ACE_ENDTRY; - ACE_CHECK; } int -Client_Task::one_iteration (ACE_ENV_SINGLE_ARG_DECL) +Client_Task::one_iteration (void) { ACE_TRY { @@ -146,7 +138,6 @@ Client_Task::one_iteration (ACE_ENV_SINGLE_ARG_DECL) this->sleep_service_->go_to_sleep (this->sleep_time_ ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; ACE_Time_Value end = ACE_OS::gettimeofday (); diff --git a/TAO/tests/MT_Timeout/Client_Task.h b/TAO/tests/MT_Timeout/Client_Task.h index e3affca8bfa..62d419c2ba1 100644 --- a/TAO/tests/MT_Timeout/Client_Task.h +++ b/TAO/tests/MT_Timeout/Client_Task.h @@ -55,10 +55,10 @@ public: private: /// Run one iteration of the test - int one_iteration (ACE_ENV_SINGLE_ARG_DECL); + int one_iteration (void); /// Make sure that the thread has a connection available - void validate_connection (ACE_ENV_SINGLE_ARG_DECL); + void validate_connection (void); private: /// A reference to the ORB diff --git a/TAO/tests/MT_Timeout/Server_Task.cpp b/TAO/tests/MT_Timeout/Server_Task.cpp index 863f5f50c64..f8e4e6b0379 100644 --- a/TAO/tests/MT_Timeout/Server_Task.cpp +++ b/TAO/tests/MT_Timeout/Server_Task.cpp @@ -22,7 +22,6 @@ Server_Task::svc (void) ACE_TRY { this->orb_->run (this->running_time_ ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; } ACE_CATCHANY { diff --git a/TAO/tests/MT_Timeout/Sleep_Service.cpp b/TAO/tests/MT_Timeout/Sleep_Service.cpp index 5a6b7d95bcf..4e19c308db6 100644 --- a/TAO/tests/MT_Timeout/Sleep_Service.cpp +++ b/TAO/tests/MT_Timeout/Sleep_Service.cpp @@ -24,7 +24,7 @@ Sleep_Service::go_to_sleep (CORBA::ULong microseconds } void -Sleep_Service::shutdown (ACE_ENV_SINGLE_ARG_DECL) +Sleep_Service::shutdown (void) ACE_THROW_SPEC ((CORBA::SystemException)) { ACE_DEBUG ((LM_DEBUG, "Shutting down the ORB\n")); diff --git a/TAO/tests/MT_Timeout/Sleep_Service.h b/TAO/tests/MT_Timeout/Sleep_Service.h index bc1c17e9210..8407220a7eb 100644 --- a/TAO/tests/MT_Timeout/Sleep_Service.h +++ b/TAO/tests/MT_Timeout/Sleep_Service.h @@ -21,7 +21,7 @@ public: ACE_ENV_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); - virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL) + virtual void shutdown (void) ACE_THROW_SPEC ((CORBA::SystemException)); private: diff --git a/TAO/tests/MT_Timeout/client.cpp b/TAO/tests/MT_Timeout/client.cpp index 21262fc921d..9ed794013b9 100644 --- a/TAO/tests/MT_Timeout/client.cpp +++ b/TAO/tests/MT_Timeout/client.cpp @@ -52,18 +52,15 @@ main (int argc, char *argv[]) { CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; if (parse_args (argc, argv) != 0) return 1; CORBA::Object_var tmp = orb->string_to_object(ior ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; Test::Sleep_Service_var sleep_service = Test::Sleep_Service::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; if (CORBA::is_nil (sleep_service.in ())) { @@ -96,13 +93,10 @@ main (int argc, char *argv[]) // Get back in sync with the server.. sleep_service->go_to_sleep (0 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - sleep_service->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + sleep_service->shutdown (); - orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + orb->destroy (); ACE_DEBUG ((LM_DEBUG, "Task 0: Successful calls = %d, timed out calls = %d\n", diff --git a/TAO/tests/MT_Timeout/server.cpp b/TAO/tests/MT_Timeout/server.cpp index c3a5b91ae3e..585b3cfe666 100644 --- a/TAO/tests/MT_Timeout/server.cpp +++ b/TAO/tests/MT_Timeout/server.cpp @@ -40,15 +40,12 @@ main (int argc, char *argv[]) { CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; CORBA::Object_var poa_object = orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; PortableServer::POA_var root_poa = PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; if (CORBA::is_nil (root_poa.in ())) ACE_ERROR_RETURN ((LM_ERROR, @@ -56,8 +53,7 @@ main (int argc, char *argv[]) 1); PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + root_poa->the_POAManager (); if (parse_args (argc, argv) != 0) return 1; @@ -69,12 +65,10 @@ main (int argc, char *argv[]) PortableServer::ServantBase_var owner_transfer(sleep_service_impl); Test::Sleep_Service_var process = - sleep_service_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + sleep_service_impl->_this (); CORBA::String_var ior = orb->object_to_string (process.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // If the ior_output_file exists, output the ior to it FILE *output_file= ACE_OS::fopen (ior_output_file, "w"); @@ -86,8 +80,7 @@ main (int argc, char *argv[]) ACE_OS::fprintf (output_file, "%s", ior.in ()); ACE_OS::fclose (output_file); - poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + poa_manager->activate (); Server_Task server_task (ACE_Thread_Manager::instance (), orb.in (), @@ -103,10 +96,8 @@ main (int argc, char *argv[]) ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n")); root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + orb->destroy (); } ACE_CATCHANY { |