summaryrefslogtreecommitdiff
path: root/TAO/tests/CSD_Strategy_Tests/TP_Test_4
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tests/CSD_Strategy_Tests/TP_Test_4')
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_4/ClientApp.cpp18
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_4/ClientApp.h4
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_4/ServerApp.cpp52
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_4/ServerApp.h12
4 files changed, 31 insertions, 55 deletions
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_4/ClientApp.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_4/ClientApp.cpp
index 57520df303c..512c34c50f2 100644
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_4/ClientApp.cpp
+++ b/TAO/tests/CSD_Strategy_Tests/TP_Test_4/ClientApp.cpp
@@ -24,17 +24,14 @@ int
ClientApp::run_i(int argc, char* argv[] ACE_ENV_ARG_DECL)
{
int result = this->init(argc, argv ACE_ENV_ARG_PARAMETER);
- if (result != 0)
+ if (result != 0)
{
return result;
}
- ACE_CHECK_RETURN (-1);
- this->client_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
+ this->client_setup();
- result = this->run_engine(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
+ result = this->run_engine();
this->cleanup();
@@ -46,7 +43,6 @@ int
ClientApp::init(int argc, char* argv[] ACE_ENV_ARG_DECL)
{
this->orb_ = CORBA::ORB_init(argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
// Parse the command-line args for this application.
// * Raises -1 if problems are encountered.
@@ -57,13 +53,12 @@ ClientApp::init(int argc, char* argv[] ACE_ENV_ARG_DECL)
void
-ClientApp::client_setup(ACE_ENV_SINGLE_ARG_DECL)
+ClientApp::client_setup(void)
{
// Turn the ior_ into a Foo_C obj ref.
Foo_C_var foo = RefHelper<Foo_C>::string_to_ref(this->orb_.in(),
this->ior_.c_str()
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
// Create the ClientEngine object, and give it the Foo_C obj ref.
this->engine_ = new Foo_C_ClientEngine(foo.in(), this->client_id_);
@@ -71,10 +66,9 @@ ClientApp::client_setup(ACE_ENV_SINGLE_ARG_DECL)
int
-ClientApp::run_engine(ACE_ENV_SINGLE_ARG_DECL)
+ClientApp::run_engine(void)
{
- bool result = this->engine_->execute(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
+ bool result = this->engine_->execute();
return result ? 0 : -1;
}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_4/ClientApp.h b/TAO/tests/CSD_Strategy_Tests/TP_Test_4/ClientApp.h
index e2f7bf6fc06..2dbf7dd6d52 100644
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_4/ClientApp.h
+++ b/TAO/tests/CSD_Strategy_Tests/TP_Test_4/ClientApp.h
@@ -24,8 +24,8 @@ class ClientApp : public TestAppBase
// These are all called, in order, by the run_i() method.
int init(int argc, char* argv[] ACE_ENV_ARG_DECL);
- void client_setup(ACE_ENV_SINGLE_ARG_DECL);
- int run_engine(ACE_ENV_SINGLE_ARG_DECL);
+ void client_setup(void);
+ int run_engine(void);
void cleanup();
// Helper methods used by the methods above.
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_4/ServerApp.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_4/ServerApp.cpp
index 9ce517c4863..2841377eb6e 100644
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_4/ServerApp.cpp
+++ b/TAO/tests/CSD_Strategy_Tests/TP_Test_4/ServerApp.cpp
@@ -39,21 +39,14 @@ ServerApp::run_i(int argc, char* argv[] ACE_ENV_ARG_DECL)
{
return result;
}
- ACE_CHECK_RETURN (-1);
-
- this->poa_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->csd_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->servant_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
+
+ this->poa_setup();
+ this->csd_setup();
+ this->servant_setup();
this->collocated_setup();
- this->poa_activate(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->run_collocated_clients(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->run_orb_event_loop(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
+ this->poa_activate();
+ this->run_collocated_clients();
+ this->run_orb_event_loop();
// Calling wait on ACE_Thread_Manager singleton to avoid the problem
// that the main thread might exit before all CSD Threads exit.
@@ -70,7 +63,6 @@ int
ServerApp::init(int argc, char* argv[] ACE_ENV_ARG_DECL)
{
this->orb_ = CORBA::ORB_init(argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
// Parse the command-line args for this application.
// * Raises -1 if problems are encountered.
@@ -86,24 +78,22 @@ ServerApp::init(int argc, char* argv[] ACE_ENV_ARG_DECL)
this->num_collocated_clients_;
TheAppShutdown->init(this->orb_.in(), num_clients ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
return 0;
}
void
-ServerApp::poa_setup(ACE_ENV_SINGLE_ARG_DECL)
+ServerApp::poa_setup(void)
{
this->poa_ = this->create_poa(this->orb_.in(),
"ChildPoa"
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
}
void
-ServerApp::csd_setup(ACE_ENV_SINGLE_ARG_DECL)
+ServerApp::csd_setup(void)
{
this->tp_strategy_ = new TAO::CSD::TP_Strategy(this->num_csd_threads_);
@@ -113,19 +103,17 @@ ServerApp::csd_setup(ACE_ENV_SINGLE_ARG_DECL)
"Failed to apply CSD strategy to poa.\n"));
ACE_THROW(TestAppException());
}
- ACE_CHECK;
}
void
-ServerApp::servant_setup(ACE_ENV_SINGLE_ARG_DECL)
+ServerApp::servant_setup(void)
{
this->servants_.create_and_activate(this->num_servants_,
this->orb_.in (),
this->poa_.in (),
this->ior_filename_prefix_.c_str()
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
}
@@ -157,19 +145,17 @@ ServerApp::collocated_setup()
void
-ServerApp::poa_activate(ACE_ENV_SINGLE_ARG_DECL)
+ServerApp::poa_activate(void)
{
PortableServer::POAManager_var poa_manager
- = this->poa_->the_POAManager(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ = this->poa_->the_POAManager();
- poa_manager->activate(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ poa_manager->activate();
}
void
-ServerApp::run_collocated_clients(ACE_ENV_SINGLE_ARG_DECL)
+ServerApp::run_collocated_clients(void)
{
if (this->num_collocated_clients_ > 0)
{
@@ -182,11 +168,10 @@ ServerApp::run_collocated_clients(ACE_ENV_SINGLE_ARG_DECL)
void
-ServerApp::run_orb_event_loop(ACE_ENV_SINGLE_ARG_DECL)
+ServerApp::run_orb_event_loop(void)
{
OrbRunner orb_runner(this->orb_.in(), this->num_orb_threads_);
- orb_runner.run(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ orb_runner.run();
TheAppShutdown->wait ();
}
@@ -348,12 +333,10 @@ ServerApp::create_poa(CORBA::ORB_ptr orb,
= RefHelper<PortableServer::POA>::resolve_initial_ref(orb,
"RootPOA"
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
// Get the POAManager from the Root POA.
PortableServer::POAManager_var poa_manager
- = root_poa->the_POAManager(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
+ = root_poa->the_POAManager();
// Create the child POA Policies.
CORBA::PolicyList policies(0);
@@ -366,7 +349,6 @@ ServerApp::create_poa(CORBA::ORB_ptr orb,
poa_manager.in(),
policies
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
// Give away the child POA_ptr from the POA_var variable.
return poa._retn();
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_4/ServerApp.h b/TAO/tests/CSD_Strategy_Tests/TP_Test_4/ServerApp.h
index 99f0af758b5..f39e160df29 100644
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_4/ServerApp.h
+++ b/TAO/tests/CSD_Strategy_Tests/TP_Test_4/ServerApp.h
@@ -27,13 +27,13 @@ class ServerApp : public TestAppBase
// These are all called, in order, by the run_i() method.
int init(int argc, char* argv[] ACE_ENV_ARG_DECL);
- void poa_setup(ACE_ENV_SINGLE_ARG_DECL);
- void csd_setup(ACE_ENV_SINGLE_ARG_DECL);
- void servant_setup(ACE_ENV_SINGLE_ARG_DECL);
+ void poa_setup(void);
+ void csd_setup(void);
+ void servant_setup(void);
void collocated_setup();
- void poa_activate(ACE_ENV_SINGLE_ARG_DECL);
- void run_collocated_clients(ACE_ENV_SINGLE_ARG_DECL);
- void run_orb_event_loop(ACE_ENV_SINGLE_ARG_DECL);
+ void poa_activate(void);
+ void run_collocated_clients(void);
+ void run_orb_event_loop(void);
bool check_validity ();
void cleanup();