summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordengg <dengg@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2005-01-27 04:57:28 +0000
committerdengg <dengg@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2005-01-27 04:57:28 +0000
commit009ac78b0d0b400cafd79258cfe7238c914a9063 (patch)
tree3e4cbcae85229900fc33bafce501e79895377aec
parentdb2a5437f26051c794f6c7bdc8eb43e86c02bc20 (diff)
downloadATCD-009ac78b0d0b400cafd79258cfe7238c914a9063.tar.gz
Wed Jan 26 22:53:12 2005 Gan Deng <dengg@dre.vanderbilt.edu>
-rw-r--r--TAO/CIAO/DAnCE/ChangeLog12
-rw-r--r--TAO/CIAO/DAnCE/ciao/Container_Impl.cpp3
-rw-r--r--TAO/CIAO/DAnCE/ciao/NodeApplication_Impl.cpp3
-rw-r--r--TAO/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client.cpp48
-rw-r--r--TAO/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client_ex.cpp5
-rw-r--r--TAO/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client_simple.cpp26
6 files changed, 58 insertions, 39 deletions
diff --git a/TAO/CIAO/DAnCE/ChangeLog b/TAO/CIAO/DAnCE/ChangeLog
index f25b82dacef..66ee0111f8a 100644
--- a/TAO/CIAO/DAnCE/ChangeLog
+++ b/TAO/CIAO/DAnCE/ChangeLog
@@ -1,3 +1,15 @@
+Wed Jan 26 22:53:12 2005 Gan Deng <dengg@dre.vanderbilt.edu>
+
+ * DAnCE/ciao/Container_Impl.cpp
+ * DAnCE/ciao/NodeApplication_Impl.cpp
+ * DAnCE/tests/NodeApplicationTest/NodeApp_test_client.cpp
+ * DAnCE/tests/NodeApplicationTest/NodeApp_test_client_ex.cpp
+ * DAnCE/tests/NodeApplicationTest/NodeApp_test_client_simple.cpp
+
+ Fixed bugs to make sure all the above three tests running OK.
+ More tests will be written, at least one will test that multiple
+ components installed on different containers running OK.
+
Wed Jan 26 12:02:41 2005 Gan Deng <dengg@dre.vanderbilt.edu>
* DAnCE/ciao/Deployment_Core.idl
diff --git a/TAO/CIAO/DAnCE/ciao/Container_Impl.cpp b/TAO/CIAO/DAnCE/ciao/Container_Impl.cpp
index db90a71d928..e70464277b8 100644
--- a/TAO/CIAO/DAnCE/ciao/Container_Impl.cpp
+++ b/TAO/CIAO/DAnCE/ciao/Container_Impl.cpp
@@ -280,7 +280,8 @@ CIAO::Container_Impl::remove (ACE_ENV_SINGLE_ARG_DECL)
if (true)
ACE_DEBUG ((LM_DEBUG, "Removing this Container!\n"));
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
+ //@TODO: Find out why shutdown?
+ //this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
}
//======================================================================
diff --git a/TAO/CIAO/DAnCE/ciao/NodeApplication_Impl.cpp b/TAO/CIAO/DAnCE/ciao/NodeApplication_Impl.cpp
index 6aaa7853b71..aab79a99555 100644
--- a/TAO/CIAO/DAnCE/ciao/NodeApplication_Impl.cpp
+++ b/TAO/CIAO/DAnCE/ciao/NodeApplication_Impl.cpp
@@ -211,7 +211,8 @@ CIAO::NodeApplication_Impl::remove (ACE_ENV_SINGLE_ARG_DECL)
if (CIAO::debug_level () > 1)
ACE_DEBUG ((LM_DEBUG, "Shutting down this NodeApplication!\n"));
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
+ //TODO: Find it out
+ //this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
}
diff --git a/TAO/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client.cpp b/TAO/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client.cpp
index 713515c826b..57c1a75e6e7 100644
--- a/TAO/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client.cpp
+++ b/TAO/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client.cpp
@@ -7,6 +7,7 @@
#include <sstream>
#include <vector>
#include <stdlib.h>
+#include "assert.h"
const char *ior = "file://test.ior";
int comp_number = 4;
@@ -65,30 +66,27 @@ main (int argc, char *argv[])
orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- Deployment::NodeApplication_var comserv =
+ Deployment::NodeApplication_var node_app =
Deployment::NodeApplication::_narrow (tmp.in ()
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (CORBA::is_nil (comserv.in ()))
+ if (CORBA::is_nil (node_app.in ()))
{
ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil ServerActivator reference <%s>\n", ior),
+ "Nil nodeapplication reference <%s>\n", ior),
1);
}
// This is what we will send out, containing all the instance info the
- // container needs
- Deployment::ImplementationInfos infos;
- infos.length (CORBA::ULong (comp_num));
-
- // This is what we will get back, a sequence of compoent object refs.
- Deployment::ComponentInfos_var comp_info;
+ // NodeApplication needs
+ Deployment::ContainerImplementationInfo container_info;
+ container_info.length (CORBA::ULong (comp_num));
CORBA::ULong i;
for (i = 0; i < comp_num; ++i)
{
- Deployment::ImplementationInfo info;
+ Deployment::ComponentImplementationInfo info;
std::stringstream tmp;
tmp << "NodeAppTest_RoundTrip:" << i;
@@ -105,31 +103,35 @@ main (int argc, char *argv[])
CORBA::string_dup ("createNodeAppTest_RoundTripHome_Servant");
//Now add the info into the infos
- infos[i] = info;
+ container_info[i] = info;
}
// For debug purpose.
for (i = 0; i < comp_num; ++i)
{
- Deployment::ImplementationInfo info;
-
std::stringstream tmp;
tmp << "NodeAppTest_RoundTrip:" << i;
// Add the names and entry points of each of the DLLs
ACE_DEBUG ((LM_DEBUG,
"The info I will send out: \n\t%s\n\t%s\n\t%s\n\t%s\n\t%s\n",
- infos[i].component_instance_name.in (),
- infos[i].executor_dll.in (),
- infos[i].executor_entrypt.in (),
- infos[i].servant_dll.in (),
- infos[i].servant_entrypt.in () ));
+ container_info[i].component_instance_name.in (),
+ container_info[i].executor_dll.in (),
+ container_info[i].executor_entrypt.in (),
+ container_info[i].servant_dll.in (),
+ container_info[i].servant_entrypt.in () ));
}
ACE_DEBUG ((LM_DEBUG, "Try installing Homes and Components\n"));
- // Install the NodeApplication Test components
- comp_info = comserv->install (infos);
+ // Create a NodeImplementationInfo sequence
+ Deployment::NodeImplementationInfo node_info;
+ node_info.length (1);
+ node_info[0] = container_info;
+
+ // Install test component and its home on NodeApplication
+ Deployment::ComponentInfos_var comp_info =
+ node_app->install (node_info ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// store the component refs
@@ -151,7 +153,7 @@ main (int argc, char *argv[])
ACE_DEBUG ((LM_DEBUG, "Installation finished successfully.\n"));
// Before we can start we have to start.
- comserv->start ();
+ node_app->start ();
ACE_CHECK_RETURN (1);
// Invoke Operation on the components
@@ -181,10 +183,10 @@ main (int argc, char *argv[])
}
ACE_DEBUG ((LM_DEBUG, "Try removing everything\n"));
- comserv->remove ();
+ node_app->remove ();
ACE_TRY_CHECK;
- ACE_DEBUG ((LM_DEBUG, "Homes removed successfully\n"));
+ ACE_DEBUG ((LM_DEBUG, "Homes and components removed successfully\n"));
orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
diff --git a/TAO/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client_ex.cpp b/TAO/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client_ex.cpp
index 90c4b9f7a61..6e05b18f3c8 100644
--- a/TAO/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client_ex.cpp
+++ b/TAO/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client_ex.cpp
@@ -152,6 +152,11 @@ main (int argc, char *argv[])
exit (1);
}
}
+
+ ACE_DEBUG ((LM_DEBUG, "Try removing test component and its home\n"));
+ node_app->remove ();
+ ACE_DEBUG ((LM_DEBUG, "Component and Home removed successfully\n"));
+
orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
ACE_DEBUG ((LM_DEBUG, "Test success!!\n"));
diff --git a/TAO/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client_simple.cpp b/TAO/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client_simple.cpp
index 8e84b9b5cd5..24b47644d19 100644
--- a/TAO/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client_simple.cpp
+++ b/TAO/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client_simple.cpp
@@ -114,23 +114,21 @@ main (int argc, char *argv[])
CORBA::Long output =
roundtrip_var->cube_long (input ACE_ENV_ARG_PARAMETER);
- if (input == output)
- ACE_DEBUG ((LM_DEBUG, "Retrun values matched!!\n"));
- else
- {
- ACE_DEBUG ((LM_DEBUG, "Return values did not match: failure\n"));
- exit (1);
- }
-
- /*
- ACE_DEBUG ((LM_DEBUG, "Try removing home\n"));
- node_app->remove_home (info.component_instance_name);
- ACE_DEBUG ((LM_DEBUG, "Home removed successfully\n"));
-*/
+ if (input == output)
+ ACE_DEBUG ((LM_DEBUG, "Retrun values matched!!\n"));
+ else
+ {
+ ACE_DEBUG ((LM_DEBUG, "Return values did not match: failure\n"));
+ exit (1);
+ }
+
+ ACE_DEBUG ((LM_DEBUG, "Try removing test component and its home\n"));
+ node_app->remove ();
+ ACE_DEBUG ((LM_DEBUG, "Component and Home removed successfully\n"));
orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- ACE_DEBUG ((LM_DEBUG, "Test success!!\n"));
+ ACE_DEBUG ((LM_DEBUG, "Test success!!\n"));
}
ACE_CATCHANY
{