summaryrefslogtreecommitdiff
path: root/TAO/tests/Client_Leaks
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tests/Client_Leaks')
-rw-r--r--TAO/tests/Client_Leaks/Client_Task.cpp23
-rw-r--r--TAO/tests/Client_Leaks/Client_Task.h4
-rw-r--r--TAO/tests/Client_Leaks/Process.cpp5
-rw-r--r--TAO/tests/Client_Leaks/Process.h4
-rw-r--r--TAO/tests/Client_Leaks/Process_Factory.cpp17
-rw-r--r--TAO/tests/Client_Leaks/Process_Factory.h6
-rw-r--r--TAO/tests/Client_Leaks/Server_Task.cpp1
-rw-r--r--TAO/tests/Client_Leaks/child.cpp23
-rw-r--r--TAO/tests/Client_Leaks/client.cpp9
-rw-r--r--TAO/tests/Client_Leaks/server.cpp17
10 files changed, 33 insertions, 76 deletions
diff --git a/TAO/tests/Client_Leaks/Client_Task.cpp b/TAO/tests/Client_Leaks/Client_Task.cpp
index 2ae166c58be..b96db57fb72 100644
--- a/TAO/tests/Client_Leaks/Client_Task.cpp
+++ b/TAO/tests/Client_Leaks/Client_Task.cpp
@@ -30,13 +30,11 @@ Client_Task::svc (void)
ACE_TRY
{
- this->validate_connection (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ this->validate_connection ();
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 != 0)
successful_calls++;
@@ -65,14 +63,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->process_factory_->noop (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ (void) this->process_factory_->noop ();
}
}
ACE_CATCH (CORBA::TRANSIENT, ex)
@@ -80,23 +77,19 @@ 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
{
Test::Process_var process =
- this->process_factory_->create_new_process (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ this->process_factory_->create_new_process ();
- (void) process->get_process_id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ (void) process->get_process_id ();
- process->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ process->shutdown ();
return 1;
}
diff --git a/TAO/tests/Client_Leaks/Client_Task.h b/TAO/tests/Client_Leaks/Client_Task.h
index 573697926b1..b6df65e973e 100644
--- a/TAO/tests/Client_Leaks/Client_Task.h
+++ b/TAO/tests/Client_Leaks/Client_Task.h
@@ -29,10 +29,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:
/// Reference to the test interface
diff --git a/TAO/tests/Client_Leaks/Process.cpp b/TAO/tests/Client_Leaks/Process.cpp
index 54a6acd58f3..9b40b7287b9 100644
--- a/TAO/tests/Client_Leaks/Process.cpp
+++ b/TAO/tests/Client_Leaks/Process.cpp
@@ -12,16 +12,15 @@ Process::Process (CORBA::ORB_ptr orb)
}
CORBA::Long
-Process::get_process_id (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+Process::get_process_id (void)
ACE_THROW_SPEC ((CORBA::SystemException))
{
return ACE_OS::getpid ();
}
void
-Process::shutdown (ACE_ENV_SINGLE_ARG_DECL)
+Process::shutdown (void)
ACE_THROW_SPEC ((CORBA::SystemException))
{
this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
}
diff --git a/TAO/tests/Client_Leaks/Process.h b/TAO/tests/Client_Leaks/Process.h
index 4118fc33d58..66e56de62de 100644
--- a/TAO/tests/Client_Leaks/Process.h
+++ b/TAO/tests/Client_Leaks/Process.h
@@ -17,10 +17,10 @@ public:
Process (CORBA::ORB_ptr orb);
// = The skeleton methods
- virtual CORBA::Long get_process_id (ACE_ENV_SINGLE_ARG_DECL)
+ virtual CORBA::Long get_process_id (void)
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/Client_Leaks/Process_Factory.cpp b/TAO/tests/Client_Leaks/Process_Factory.cpp
index f1039150d26..7e474c5fb29 100644
--- a/TAO/tests/Client_Leaks/Process_Factory.cpp
+++ b/TAO/tests/Client_Leaks/Process_Factory.cpp
@@ -20,24 +20,21 @@ Process_Factory::shutdown_received (void)
}
Test::Process_ptr
-Process_Factory::create_new_process (ACE_ENV_SINGLE_ARG_DECL)
+Process_Factory::create_new_process (void)
ACE_THROW_SPEC ((CORBA::SystemException,Test::Spawn_Failed))
{
Startup_Callback *startup_callback_impl;
ACE_NEW_THROW_EX (startup_callback_impl,
Startup_Callback,
CORBA::NO_MEMORY ());
- ACE_CHECK_RETURN (Test::Process::_nil ());
PortableServer::ServantBase_var owner_transfer(startup_callback_impl);
Test::Startup_Callback_var startup_callback =
- startup_callback_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (Test::Process::_nil ());
+ startup_callback_impl->_this ();
CORBA::String_var ior =
this->orb_->object_to_string (startup_callback.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (Test::Process::_nil ());
const char* argv[3] = {
"child",
@@ -69,7 +66,6 @@ Process_Factory::create_new_process (ACE_ENV_SINGLE_ARG_DECL)
{
ACE_Time_Value interval (0, 10000);
this->orb_->perform_work (interval ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (Test::Process::_nil ());
process_has_started =
startup_callback_impl->process_has_started (the_process.out ());
@@ -78,13 +74,10 @@ Process_Factory::create_new_process (ACE_ENV_SINGLE_ARG_DECL)
ACE_TRY
{
PortableServer::POA_var poa =
- startup_callback_impl->_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ startup_callback_impl->_default_POA ();
PortableServer::ObjectId_var id =
poa->servant_to_id (startup_callback_impl ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
poa->deactivate_object (id.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
}
ACE_CATCHANY
{
@@ -104,13 +97,13 @@ Process_Factory::create_new_process (ACE_ENV_SINGLE_ARG_DECL)
}
void
-Process_Factory::noop (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+Process_Factory::noop (void)
ACE_THROW_SPEC ((CORBA::SystemException))
{
}
void
-Process_Factory::shutdown (ACE_ENV_SINGLE_ARG_DECL)
+Process_Factory::shutdown (void)
ACE_THROW_SPEC ((CORBA::SystemException))
{
this->shutdown_received_ = 1;
diff --git a/TAO/tests/Client_Leaks/Process_Factory.h b/TAO/tests/Client_Leaks/Process_Factory.h
index 0836a583d84..2aee99b70cf 100644
--- a/TAO/tests/Client_Leaks/Process_Factory.h
+++ b/TAO/tests/Client_Leaks/Process_Factory.h
@@ -20,13 +20,13 @@ public:
int shutdown_received (void);
// = The skeleton methods
- virtual Test::Process_ptr create_new_process (ACE_ENV_SINGLE_ARG_DECL)
+ virtual Test::Process_ptr create_new_process (void)
ACE_THROW_SPEC ((CORBA::SystemException,Test::Spawn_Failed));
- virtual void noop (ACE_ENV_SINGLE_ARG_DECL)
+ virtual void noop (void)
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/Client_Leaks/Server_Task.cpp b/TAO/tests/Client_Leaks/Server_Task.cpp
index 150de719f94..5fc1eaba932 100644
--- a/TAO/tests/Client_Leaks/Server_Task.cpp
+++ b/TAO/tests/Client_Leaks/Server_Task.cpp
@@ -23,7 +23,6 @@ Server_Task::svc (void)
// run the test for at most 120 seconds...
// ACE_Time_Value tv (120, 0);
this->orb_->run ( /* tv, */ ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
}
ACE_CATCHANY
{
diff --git a/TAO/tests/Client_Leaks/child.cpp b/TAO/tests/Client_Leaks/child.cpp
index 4ee5c104d0b..1306fce8821 100644
--- a/TAO/tests/Client_Leaks/child.cpp
+++ b/TAO/tests/Client_Leaks/child.cpp
@@ -12,14 +12,12 @@ main (int argc, char *argv[])
{
CORBA::ORB_var orb =
CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
if (argc < 2)
{
// Paranoia, we should have an auto_ptr-like gadget for
// this.
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ orb->destroy ();
ACE_ERROR_RETURN ((LM_ERROR,
"Usage: %s <ior>\n",
@@ -28,10 +26,8 @@ main (int argc, char *argv[])
CORBA::Object_var object =
orb->string_to_object (argv[1] ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
Test::Startup_Callback_var startup_callback =
Test::Startup_Callback::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
if (CORBA::is_nil (startup_callback.in ()))
{
ACE_ERROR_RETURN ((LM_ERROR,
@@ -41,11 +37,9 @@ main (int argc, char *argv[])
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,
@@ -53,8 +47,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 ();
Process *process_impl;
ACE_NEW_RETURN (process_impl,
@@ -63,24 +56,18 @@ main (int argc, char *argv[])
PortableServer::ServantBase_var owner_transfer(process_impl);
Test::Process_var process =
- process_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ process_impl->_this ();
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ poa_manager->activate ();
startup_callback->started (process.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
ACE_Time_Value tv (50, 0);
orb->run (tv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
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
{
diff --git a/TAO/tests/Client_Leaks/client.cpp b/TAO/tests/Client_Leaks/client.cpp
index a06c49b3e8a..dd2188d33ff 100644
--- a/TAO/tests/Client_Leaks/client.cpp
+++ b/TAO/tests/Client_Leaks/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::Process_Factory_var process_factory =
Test::Process_Factory::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
if (CORBA::is_nil (process_factory.in ()))
{
@@ -83,11 +80,9 @@ main (int argc, char *argv[])
}
ACE_Thread_Manager::instance ()->wait ();
- process_factory->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ process_factory->shutdown ();
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ orb->destroy ();
// Only pass the test if 90% of the calls worked
if (client_task.successful_calls () < 0.9 * iterations * threads)
diff --git a/TAO/tests/Client_Leaks/server.cpp b/TAO/tests/Client_Leaks/server.cpp
index 4260fbfd963..e2cdeaa4672 100644
--- a/TAO/tests/Client_Leaks/server.cpp
+++ b/TAO/tests/Client_Leaks/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(process_factory_impl);
Test::Process_Factory_var process =
- process_factory_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ process_factory_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 (orb.in (),
ACE_Thread_Manager::instance ());
@@ -102,10 +95,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
{