summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormsmit <msmit@remedy.nl>2009-11-25 13:44:38 +0000
committermsmit <msmit@remedy.nl>2009-11-25 13:44:38 +0000
commit4a2c58626f11c191ddc479ca742ebf7d964a80b9 (patch)
tree12d5ed77c91b8775b562b7784f5db635f9e54ebb
parent57063a24fcdaf16712c4cc3aab41affb73104dc3 (diff)
downloadATCD-4a2c58626f11c191ddc479ca742ebf7d964a80b9.tar.gz
Wed Nov 25 13:45:05 UTC 2009 Marcel Smit <msmit@remedy.nl>
* bin/ciao_tests.lst: * connectors/dds4ccm/tests/SetConnectorAttributes: * connectors/dds4ccm/tests/SetConnectorAttributes/Base: * connectors/dds4ccm/tests/SetConnectorAttributes/Base/SetConnectorAttribute_Base.idl: * connectors/dds4ccm/tests/SetConnectorAttributes/Base/SetConnectorAttribute_Base.mpc: * connectors/dds4ccm/tests/SetConnectorAttributes/Connector: * connectors/dds4ccm/tests/SetConnectorAttributes/Connector/SetConnectorAttribute_Connector.idl: * connectors/dds4ccm/tests/SetConnectorAttributes/Connector/SetConnectorAttribute_Connector.mpc: * connectors/dds4ccm/tests/SetConnectorAttributes/Connector/SetConnectorAttribute_Connector_exec.h: * connectors/dds4ccm/tests/SetConnectorAttributes/Connector/SetConnectorAttribute_Connector_exec.cpp: * connectors/dds4ccm/tests/SetConnectorAttributes/descriptors: * connectors/dds4ccm/tests/SetConnectorAttributes/descriptors/Plan.cdp: * connectors/dds4ccm/tests/SetConnectorAttributes/descriptors/USER_QOS_PROFILES.xml: * connectors/dds4ccm/tests/SetConnectorAttributes/descriptors/run_test.pl: Added this test in order to test whether the connector attributes are set properly.
-rw-r--r--CIAO/ChangeLog18
-rw-r--r--CIAO/bin/ciao_tests.lst1
-rw-r--r--CIAO/connectors/dds4ccm/tests/SetConnectorAttributes/Base/SetConnectorAttribute_Base.idl18
-rw-r--r--CIAO/connectors/dds4ccm/tests/SetConnectorAttributes/Base/SetConnectorAttribute_Base.mpc77
-rw-r--r--CIAO/connectors/dds4ccm/tests/SetConnectorAttributes/Connector/SetConnectorAttribute_Connector.idl26
-rw-r--r--CIAO/connectors/dds4ccm/tests/SetConnectorAttributes/Connector/SetConnectorAttribute_Connector.mpc145
-rw-r--r--CIAO/connectors/dds4ccm/tests/SetConnectorAttributes/Connector/SetConnectorAttribute_Connector_exec.cpp139
-rw-r--r--CIAO/connectors/dds4ccm/tests/SetConnectorAttributes/Connector/SetConnectorAttribute_Connector_exec.h67
-rw-r--r--CIAO/connectors/dds4ccm/tests/SetConnectorAttributes/descriptors/Plan.cdp150
-rw-r--r--CIAO/connectors/dds4ccm/tests/SetConnectorAttributes/descriptors/USER_QOS_PROFILES.xml70
-rwxr-xr-xCIAO/connectors/dds4ccm/tests/SetConnectorAttributes/descriptors/run_test.pl225
11 files changed, 936 insertions, 0 deletions
diff --git a/CIAO/ChangeLog b/CIAO/ChangeLog
index 98d5af1e4c3..dab1e5a6ff7 100644
--- a/CIAO/ChangeLog
+++ b/CIAO/ChangeLog
@@ -1,3 +1,21 @@
+Wed Nov 25 13:45:05 UTC 2009 Marcel Smit <msmit@remedy.nl>
+
+ * bin/ciao_tests.lst:
+ * connectors/dds4ccm/tests/SetConnectorAttributes:
+ * connectors/dds4ccm/tests/SetConnectorAttributes/Base:
+ * connectors/dds4ccm/tests/SetConnectorAttributes/Base/SetConnectorAttribute_Base.idl:
+ * connectors/dds4ccm/tests/SetConnectorAttributes/Base/SetConnectorAttribute_Base.mpc:
+ * connectors/dds4ccm/tests/SetConnectorAttributes/Connector:
+ * connectors/dds4ccm/tests/SetConnectorAttributes/Connector/SetConnectorAttribute_Connector.idl:
+ * connectors/dds4ccm/tests/SetConnectorAttributes/Connector/SetConnectorAttribute_Connector.mpc:
+ * connectors/dds4ccm/tests/SetConnectorAttributes/Connector/SetConnectorAttribute_Connector_exec.h:
+ * connectors/dds4ccm/tests/SetConnectorAttributes/Connector/SetConnectorAttribute_Connector_exec.cpp:
+ * connectors/dds4ccm/tests/SetConnectorAttributes/descriptors:
+ * connectors/dds4ccm/tests/SetConnectorAttributes/descriptors/Plan.cdp:
+ * connectors/dds4ccm/tests/SetConnectorAttributes/descriptors/USER_QOS_PROFILES.xml:
+ * connectors/dds4ccm/tests/SetConnectorAttributes/descriptors/run_test.pl:
+ Added this test in order to test whether the connector attributes are set properly.
+
Wed Nov 25 13:15:25 UTC 2009 Marcel Smit <msmit@remedy.nl>
* connectors/dds4ccm/impl/ndds/DDS_TopicBase_Connector_T.cpp:
diff --git a/CIAO/bin/ciao_tests.lst b/CIAO/bin/ciao_tests.lst
index 2155d12a1f8..b4148180fd0 100644
--- a/CIAO/bin/ciao_tests.lst
+++ b/CIAO/bin/ciao_tests.lst
@@ -43,3 +43,4 @@ TAO/CIAO/connectors/dds4ccm/tests/Get_Connection_Test/descriptors/run_test.pl: !
TAO/CIAO/connectors/dds4ccm/tests/KeyedWriter/descriptors/run_test.pl: !STATIC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NOXERCES !ACE_FOR_TAO !ST NDDS
TAO/CIAO/connectors/dds4ccm/tests/On_Inconsistent_Topic/descriptors/run_test.pl: !STATIC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NOXERCES !ACE_FOR_TAO !ST NDDS
TAO/CIAO/connectors/dds4ccm/tests/NonChangeableAttribute/descriptors/run_test.pl: !STATIC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NOXERCES !ACE_FOR_TAO !ST NDDS
+TAO/CIAO/connectors/dds4ccm/tests/SetConnectorAttributes/descriptors/run_test.pl: !STATIC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NOXERCES !ACE_FOR_TAO !ST NDDS
diff --git a/CIAO/connectors/dds4ccm/tests/SetConnectorAttributes/Base/SetConnectorAttribute_Base.idl b/CIAO/connectors/dds4ccm/tests/SetConnectorAttributes/Base/SetConnectorAttribute_Base.idl
new file mode 100644
index 00000000000..f94c2877dc2
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/SetConnectorAttributes/Base/SetConnectorAttribute_Base.idl
@@ -0,0 +1,18 @@
+// $Id$
+
+/**
+ * @file SetConnectorAttribute_Base.idl
+ * @author Marcel Smit <msmit@remedy.nl>
+ */
+
+#ifndef SETCONNECTORATTRIBUTE_BASE_IDL
+#define SETCONNECTORATTRIBUTE_BASE_IDL
+
+struct SetConnectorAttributeTest {
+ string key;
+ long iteration;
+};
+
+typedef sequence<SetConnectorAttributeTest> SetConnectorAttributeTest_Seq;
+
+#endif
diff --git a/CIAO/connectors/dds4ccm/tests/SetConnectorAttributes/Base/SetConnectorAttribute_Base.mpc b/CIAO/connectors/dds4ccm/tests/SetConnectorAttributes/Base/SetConnectorAttribute_Base.mpc
new file mode 100644
index 00000000000..7bcfab5bb5d
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/SetConnectorAttributes/Base/SetConnectorAttribute_Base.mpc
@@ -0,0 +1,77 @@
+// $Id$
+// This file is generated with "generate_component_mpc.pl -o ../lib -u DDS -n SetConnectorAttribute_Base"
+
+project(DDS_SetConnectorAttributeBase_idl_gen) : taoidldefaults, anytypecode {
+ custom_only = 1
+ idlflags -= -St -Sa
+ idlflags += -SS -Gxhst \
+ -Wb,stub_export_macro=SETCONNECTORATTRIBUTE_BASE_STUB_Export \
+ -Wb,stub_export_include=SetConnectorAttribute_Base_stub_export.h
+
+ IDL_Files {
+ SetConnectorAttribute_Base.idl
+ }
+}
+
+project(DDS_SetConnectorAttributeBase_ndds_ts_gen) : ndds_ts_defaults {
+ custom_only = 1
+ after += DDS_SetConnectorAttributeBase_idl_gen
+ ndds_ts_flags += -corba SetConnectorAttribute_BaseC.h -orb ACE_TAO1.7
+
+ NDDSTypeSupport_Files {
+ SetConnectorAttribute_Base.idl
+ }
+}
+
+project(DDS_SetConnectorAttributeBase_NDDS_TS) : nddslib, taolib {
+ after += DDS_SetConnectorAttributeBase_ndds_ts_gen DDS_SetConnectorAttributeBase_stub
+ libs += DDS_SetConnectorAttributeBase_stub
+ libout = ../lib
+ libpaths += ../lib
+ sharedname = DDS_SetConnectorAttributeBase_NDDS_TS
+ dynamicflags = NDDS_USER_DLL_EXPORT
+
+ verbatim(gnuace, macros) {
+ override no_hidden_visibility = 1
+ }
+
+ Source_Files {
+ SetConnectorAttribute_Base.cxx
+ SetConnectorAttribute_BasePlugin.cxx
+ SetConnectorAttribute_BaseSupport.cxx
+ }
+
+ Header_Files {
+ SetConnectorAttribute_Base.h
+ SetConnectorAttribute_BasePlugin.h
+ SetConnectorAttribute_BaseSupport.h
+ }
+
+ Inline_Files {
+ }
+}
+
+project(DDS_SetConnectorAttributeBase_stub) : ccm_stub {
+ after += DDS_SetConnectorAttributeBase_idl_gen
+ libout = ../lib
+ libpaths += ../lib
+ sharedname = DDS_SetConnectorAttributeBase_stub
+ dynamicflags = SETCONNECTORATTRIBUTE_BASE_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ SetConnectorAttribute_BaseC.cpp
+ }
+
+ Header_Files {
+ SetConnectorAttribute_BaseC.h
+ SetConnectorAttribute_Base_stub_export.h
+ }
+
+ Inline_Files {
+ SetConnectorAttribute_BaseC.inl
+ }
+}
+
diff --git a/CIAO/connectors/dds4ccm/tests/SetConnectorAttributes/Connector/SetConnectorAttribute_Connector.idl b/CIAO/connectors/dds4ccm/tests/SetConnectorAttributes/Connector/SetConnectorAttribute_Connector.idl
new file mode 100644
index 00000000000..9a80aa471d4
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/SetConnectorAttributes/Connector/SetConnectorAttribute_Connector.idl
@@ -0,0 +1,26 @@
+// $Id$
+
+/**
+ * @file SetConnectorAttribute_Connector.idl
+ * @author Marcel Smit <msmit@remedy.nl>
+ *
+ * by-hand translation of the idl3p.
+ */
+
+#ifndef SETCONNECTORATTRIBUTE_CONNECTOR_IDL_
+#define SETCONNECTORATTRIBUTE_CONNECTOR_IDL_
+
+#include <Components.idl>
+#include "Base/SetConnectorAttribute_Base.idl"
+#include "connectors/dds4ccm/idl/ccm_dds.idl"
+
+TYPED_MODULE( ::SetConnectorAttributeTest, ::SetConnectorAttributeTest_Seq, SetConnectorAttributeTest)
+
+module SetConnectorAttribute
+{
+ connector SetConnectorAttribute_Connector : ::CCM_DDS::SetConnectorAttributeTest::DDS_Event
+ {
+ };
+};
+
+#endif /* SetConnectorAttribute_CONNECTOR_IDL_ */
diff --git a/CIAO/connectors/dds4ccm/tests/SetConnectorAttributes/Connector/SetConnectorAttribute_Connector.mpc b/CIAO/connectors/dds4ccm/tests/SetConnectorAttributes/Connector/SetConnectorAttribute_Connector.mpc
new file mode 100644
index 00000000000..9685f8ffd1a
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/SetConnectorAttributes/Connector/SetConnectorAttribute_Connector.mpc
@@ -0,0 +1,145 @@
+// $Id$
+// This file is generated with "generate_component_mpc.pl -p DDS_SetConnectorAttributeBase -l .. -o ../lib -u DDS SetConnectorAttribute_Connector"
+
+project(DDS_SetConnectorAttributeConnector_idl_gen) : connectoridldefaults {
+ after += DDS4CCM_idl_gen
+ custom_only = 1
+ idlflags += -Wb,stub_export_macro=SETCONNECTORATTRIBUTE_CONNECTOR_STUB_Export \
+ -Wb,stub_export_include=SetConnectorAttribute_Connector_stub_export.h \
+ -Wb,skel_export_macro=SETCONNECTORATTRIBUTE_CONNECTOR_SVNT_Export \
+ -Wb,skel_export_include=SetConnectorAttribute_Connector_svnt_export.h \
+ -Wb,svnt_export_macro=SETCONNECTORATTRIBUTE_CONNECTOR_SVNT_Export \
+ -Wb,svnt_export_include=SetConnectorAttribute_Connector_svnt_export.h \
+ -Wb,exec_export_macro=SETCONNECTORATTRIBUTE_CONNECTOR_EXEC_Export \
+ -Wb,exec_export_include=SetConnectorAttribute_Connector_exec_export.h \
+ -I ..
+
+ IDL_Files {
+ SetConnectorAttribute_Connector.idl
+ }
+}
+
+project(DDS_SetConnectorAttributeConnector_lem_gen) : ciaoidldefaults {
+ custom_only = 1
+ after += DDS_SetConnectorAttributeConnector_idl_gen
+ idlflags += -Wb,stub_export_macro=SETCONNECTORATTRIBUTE_CONNECTOR_LEM_STUB_Export \
+ -Wb,stub_export_include=SetConnectorAttribute_Connector_lem_stub_export.h \
+ -SS -Gxhst \
+ -I .. -I $(CIAO_ROOT)/connectors -I$(CIAO_ROOT)/connectors/dds4ccm/idl
+
+ IDL_Files {
+ SetConnectorAttribute_ConnectorE.idl
+ }
+}
+
+project(DDS_SetConnectorAttributeConnector_lem_stub) : ccm_svnt, dds4ccm_base {
+ after += DDS_SetConnectorAttributeConnector_lem_gen DDS_SetConnectorAttributeConnector_stub DDS_SetConnectorAttributeBase_stub DDS4CCM_lem_stub
+ libs += DDS_SetConnectorAttributeBase_stub DDS_SetConnectorAttributeConnector_stub DDS4CCM_lem_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ sharedname = DDS_SetConnectorAttributeConnector_lem_stub
+ dynamicflags = SETCONNECTORATTRIBUTE_CONNECTOR_LEM_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ SetConnectorAttribute_ConnectorEC.cpp
+ }
+
+ Header_Files {
+ SetConnectorAttribute_ConnectorEC.h
+ SetConnectorAttribute_Connector_lem_stub_export.h
+ }
+
+ Inline_Files {
+ SetConnectorAttribute_ConnectorEC.inl
+ }
+}
+
+project(DDS_SetConnectorAttributeConnector_stub) : ccm_stub, dds4ccm_base {
+ after += DDS_SetConnectorAttributeConnector_idl_gen DDS_SetConnectorAttributeBase_stub
+ libs += DDS_SetConnectorAttributeBase_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ sharedname = DDS_SetConnectorAttributeConnector_stub
+ dynamicflags = SETCONNECTORATTRIBUTE_CONNECTOR_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ SetConnectorAttribute_ConnectorC.cpp
+ }
+
+ Header_Files {
+ SetConnectorAttribute_ConnectorC.h
+ SetConnectorAttribute_Connector_stub_export.h
+ }
+
+ Inline_Files {
+ SetConnectorAttribute_ConnectorC.inl
+ }
+}
+
+project(DDS_SetConnectorAttributeConnector_exec) : ciao_executor, dds4ccm_skel, nddslib {
+ after += DDS_SetConnectorAttributeConnector_lem_stub DDS_SetConnectorAttributeConnector_stub DDS4CCM_lem_stub CIAO_DDS4CCM_NDDS_Impl DDS_SetConnectorAttributeBase_NDDS_TS
+ sharedname = DDS_SetConnectorAttributeConnector_exec
+ libs += DDS_SetConnectorAttributeConnector_stub DDS_SetConnectorAttributeConnector_lem_stub DDS_SetConnectorAttributeBase_stub CIAO_DDS4CCM_NDDS_Impl DDS4CCM_lem_stub DDS_SetConnectorAttributeBase_NDDS_TS
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ dynamicflags = SETCONNECTORATTRIBUTE_CONNECTOR_EXEC_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ SetConnectorAttribute_Connector_exec.cpp
+ }
+
+ Header_Files {
+ SetConnectorAttribute_Connector_exec.h
+ SetConnectorAttribute_Connector_exec_export.h
+ }
+
+ Inline_Files {
+ }
+}
+
+
+project(DDS_SetConnectorAttributeConnector_svnt) : ciao_servant, dds4ccm_skel, nddslib {
+ after += DDS_SetConnectorAttributeConnector_lem_stub DDS_SetConnectorAttributeConnector_exec DDS_SetConnectorAttributeConnector_stub DDS4CCM_lem_stub
+ sharedname = DDS_SetConnectorAttributeConnector_svnt
+ libs += DDS_SetConnectorAttributeConnector_stub \
+ DDS_SetConnectorAttributeConnector_lem_stub \
+ DDS_SetConnectorAttributeBase_stub \
+ DDS_SetConnectorAttributeConnector_exec \
+ DDS4CCM_lem_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ dynamicflags = SETCONNECTORATTRIBUTE_CONNECTOR_SVNT_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ SetConnectorAttribute_ConnectorS.cpp
+ SetConnectorAttribute_Connector_svnt.cpp
+ }
+
+ Header_Files {
+ SetConnectorAttribute_ConnectorS.h
+ SetConnectorAttribute_Connector_svnt.h
+ SetConnectorAttribute_Connector_svnt_export.h
+ }
+
+ Inline_Files {
+ SetConnectorAttribute_ConnectorS.inl
+ }
+}
+
+
diff --git a/CIAO/connectors/dds4ccm/tests/SetConnectorAttributes/Connector/SetConnectorAttribute_Connector_exec.cpp b/CIAO/connectors/dds4ccm/tests/SetConnectorAttributes/Connector/SetConnectorAttribute_Connector_exec.cpp
new file mode 100644
index 00000000000..9749c682115
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/SetConnectorAttributes/Connector/SetConnectorAttribute_Connector_exec.cpp
@@ -0,0 +1,139 @@
+// -*- C++ -*-
+// $Id$
+
+#include "SetConnectorAttribute_Connector_exec.h"
+
+#define DOMAIN_ID_TO_TEST 100
+#define QOS_PROFILE_TO_TEST "'qos profile'"
+#define TOPIC_NAME_TO_TEST "SetConnectorAttribute"
+#define KEY_FIELDS_PREFIX_TO_TEST "string_"
+#define NO_OFF_KEY_FIELDS_TO_TEST 5
+
+namespace CIAO_SetConnectorAttribute_SetConnectorAttribute_Connector_Impl
+{
+ SetConnectorAttribute_Connector_exec_i::SetConnectorAttribute_Connector_exec_i (void)
+ : DDS_Event_Connector_T<SetConnectorAttributeTest_DDS_Traits, SetConnectorAttributeTest_Connector_Traits> ()
+ {
+ }
+
+ SetConnectorAttribute_Connector_exec_i::~SetConnectorAttribute_Connector_exec_i (void)
+ {
+ }
+
+ void
+ SetConnectorAttribute_Connector_exec_i::test_domain_id ()
+ {
+ try
+ {
+ DDS::DomainId_t id = this->domain_id ();
+ if (id != DOMAIN_ID_TO_TEST)
+ {
+ CIAO_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: ")
+ ACE_TEXT ("Domain ID not set properly; set <%d> - should be <%d>\n"),
+ id, DOMAIN_ID_TO_TEST));
+ }
+ }
+ catch (...)
+ {
+ CIAO_ERROR ((LM_ERROR,
+ ACE_TEXT ("ERROR: test_domain_id : Unkown exception caught\n")));
+ }
+ }
+
+ void
+ SetConnectorAttribute_Connector_exec_i::test_qos_profile ()
+ {
+ try
+ {
+ char * profile = this->qos_profile ();
+ if (ACE_OS::strcmp (profile, QOS_PROFILE_TO_TEST) != 0)
+ {
+ CIAO_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: ")
+ ACE_TEXT ("QOS profile not set properly; set <%C> - should be <%C>\n"),
+ profile, QOS_PROFILE_TO_TEST));
+ }
+ }
+ catch (...)
+ {
+ CIAO_ERROR ((LM_ERROR,
+ ACE_TEXT ("ERROR: test_qos_profile : Unkown exception caught\n")));
+ }
+ }
+
+ void
+ SetConnectorAttribute_Connector_exec_i::test_topic_name ()
+ {
+ try
+ {
+ char * topic_name = this->topic_name ();
+ if (ACE_OS::strcmp (topic_name, TOPIC_NAME_TO_TEST) != 0)
+ {
+ CIAO_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: ")
+ ACE_TEXT ("Topic name not set properly; set <%C> - should be <%C>\n"),
+ topic_name, TOPIC_NAME_TO_TEST));
+ }
+ }
+ catch (...)
+ {
+ CIAO_ERROR ((LM_ERROR,
+ ACE_TEXT ("ERROR: test_topic_name : Unkown exception caught\n")));
+ }
+ }
+
+ void
+ SetConnectorAttribute_Connector_exec_i::test_key_fields ()
+ {
+ try
+ {
+ ::DDS::StringSeq *key_fields = this->key_fields ();
+ if (key_fields->length () != NO_OFF_KEY_FIELDS_TO_TEST)
+ {
+ CIAO_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: ")
+ ACE_TEXT ("Incorrect size of key fields; set <%C> - should be <%C>\n"),
+ key_fields->length (), NO_OFF_KEY_FIELDS_TO_TEST));
+ }
+ for (CORBA::ULong i = 0; i < key_fields->length (); ++i)
+ {
+ char tmp[256];
+ ACE_OS::sprintf (tmp, KEY_FIELDS_PREFIX_TO_TEST, i+1);
+ if (ACE_OS::strcmp (tmp, (*key_fields)[i].in ()) != 0)
+ {
+ CIAO_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: ")
+ ACE_TEXT ("Incorrect string found in key fields; ")
+ ACE_TEXT ("index <%d> - set <%C> - should be <%s>\n"),
+ i, (*key_fields)[i].in (), tmp));
+ }
+ }
+ delete key_fields;
+ }
+ catch (...)
+ {
+ CIAO_ERROR ((LM_ERROR,
+ ACE_TEXT ("ERROR: test_key_fields : Unkown exception caught\n")));
+ }
+ }
+
+
+ void
+ SetConnectorAttribute_Connector_exec_i::ccm_activate ()
+ {
+ test_domain_id ();
+ test_qos_profile ();
+ test_topic_name ();
+ test_key_fields ();
+ }
+
+ extern "C" SETCONNECTORATTRIBUTE_CONNECTOR_EXEC_Export ::Components::EnterpriseComponent_ptr
+ create_SetConnectorAttribute_SetConnectorAttribute_Connector_Impl (void)
+ {
+ ::Components::EnterpriseComponent_ptr retval =
+ ::Components::EnterpriseComponent::_nil ();
+
+ ACE_NEW_NORETURN (
+ retval,
+ SetConnectorAttribute_Connector_exec_i ());
+
+ return retval;
+ }
+}
+
diff --git a/CIAO/connectors/dds4ccm/tests/SetConnectorAttributes/Connector/SetConnectorAttribute_Connector_exec.h b/CIAO/connectors/dds4ccm/tests/SetConnectorAttributes/Connector/SetConnectorAttribute_Connector_exec.h
new file mode 100644
index 00000000000..c7c4879f886
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/SetConnectorAttributes/Connector/SetConnectorAttribute_Connector_exec.h
@@ -0,0 +1,67 @@
+// -*- C++ -*-
+// $Id$
+
+#ifndef SETCONNECTORATTRIBUTE_CONNECTOR_EXEC_H_
+#define SETCONNECTORATTRIBUTE_CONNECTOR_EXEC_H_
+
+#include /**/ "ace/pre.h"
+
+#include "SetConnectorAttribute_ConnectorEC.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include /**/ "SetConnectorAttribute_Connector_exec_export.h"
+#include "tao/LocalObject.h"
+
+#include "dds4ccm/impl/ndds/DDS4CCM_Traits.h"
+#include "dds4ccm/impl/ndds/DDS_Event_Connector_T.h"
+
+#include "Base/SetConnectorAttribute_BaseSupport.h"
+
+namespace CIAO_SetConnectorAttribute_SetConnectorAttribute_Connector_Impl
+{
+ // @from use of SetConnectorAttributeTest as a parameter
+ typedef CIAO::DDS4CCM::RTI::Type_Traits <
+ SetConnectorAttributeTest,
+ SetConnectorAttributeTestSeq,
+ SetConnectorAttributeTestTypeSupport,
+ SetConnectorAttributeTestDataWriter,
+ SetConnectorAttributeTestDataReader > SetConnectorAttributeTest_DDS_Traits;
+
+ typedef CIAO::DDS4CCM::Connector_Traits <
+ ::CIAO_SetConnectorAttribute_SetConnectorAttribute_Connector_Impl::SetConnectorAttribute_Connector_Exec,
+ SetConnectorAttributeTest_Seq,
+ ::CCM_DDS::SetConnectorAttributeTest::CCM_Writer,
+ ::CCM_DDS::SetConnectorAttributeTest::CCM_Updater,
+ ::CCM_DDS::SetConnectorAttributeTest::CCM_Getter,
+ ::CCM_DDS::SetConnectorAttributeTest::CCM_Reader,
+ ::SetConnectorAttribute::CCM_SetConnectorAttribute_Connector_Context,
+ ::CCM_DDS::SetConnectorAttributeTest::Listener,
+ ::CCM_DDS::SetConnectorAttributeTest::StateListener,
+ ::CCM_DDS::ConnectorStatusListener> SetConnectorAttributeTest_Connector_Traits;
+
+ class SETCONNECTORATTRIBUTE_CONNECTOR_EXEC_Export SetConnectorAttribute_Connector_exec_i :
+ public DDS_Event_Connector_T <SetConnectorAttributeTest_DDS_Traits, SetConnectorAttributeTest_Connector_Traits>
+ {
+ public:
+ SetConnectorAttribute_Connector_exec_i (void);
+ virtual ~SetConnectorAttribute_Connector_exec_i (void);
+
+ void ccm_activate (void);
+ private:
+ void test_domain_id ();
+ void test_qos_profile ();
+ void test_topic_name ();
+ void test_key_fields ();
+ };
+
+ extern "C" SETCONNECTORATTRIBUTE_CONNECTOR_EXEC_Export ::Components::EnterpriseComponent_ptr
+ create_SetConnectorAttribute_SetConnectorAttribute_Connector_Impl (void);
+}
+
+#include /**/ "ace/post.h"
+
+#endif /* ifndef */
+
diff --git a/CIAO/connectors/dds4ccm/tests/SetConnectorAttributes/descriptors/Plan.cdp b/CIAO/connectors/dds4ccm/tests/SetConnectorAttributes/descriptors/Plan.cdp
new file mode 100644
index 00000000000..62a532823e9
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/SetConnectorAttributes/descriptors/Plan.cdp
@@ -0,0 +1,150 @@
+<Deployment:DeploymentPlan
+ xmlns:Deployment="http://www.omg.org/Deployment"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd">
+ <label>SetConnectorAttributeAttribute_Depl_1</label>
+ <UUID>SetConnectorAttributeAttribute_Depl_1</UUID>
+
+
+ <implementation xmi:id="SetConnectorAttributeConnectorComponentImplementation">
+ <name>SetConnectorAttributeConnectorComponentImplementation</name>
+ <source/>
+ <artifact xmi:idref="SetConnectorAttributeConnector_ExecArtifact" />
+ <artifact xmi:idref="SetConnectorAttributeConnector_SvntArtifact" />
+ <execParameter>
+ <!-- entrypoint as exec parameter (see 10.6.1) -->
+ <name>component factory</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_SetConnectorAttribute_SetConnectorAttribute_Connector_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_SetConnectorAttribute_SetConnectorAttribute_Connector_Servant</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>SetConnectorAttributeConnector_svnt</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>SetConnectorAttributeConnector_exec</string>
+ </value>
+ </value>
+ </execParameter>
+ </implementation>
+ <instance xmi:id="SetConnectorAttributeConnectorComponentInstance">
+ <name>SetConnectorAttributeConnectorComponent</name>
+ <node>ComponentNode</node>
+ <!-- hostname -->
+ <source/>
+ <implementation xmi:idref="SetConnectorAttributeConnectorComponentImplementation" />
+ <configProperty>
+ <name>topic_name</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>SetConnectorAttribute</string>
+ </value>
+ </value>
+ </configProperty>
+ <configProperty>
+ <name>domain_id</name>
+ <value>
+ <type>
+ <kind>tk_long</kind>
+ </type>
+ <value>
+ <long>100</long>
+ </value>
+ </value>
+ </configProperty>
+ <configProperty>
+ <name>qos_profile</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>'qos profile'</string>
+ </value>
+ </value>
+ </configProperty>
+ <configProperty>
+ <name>key_fields</name>
+ <value>
+ <type>
+ <kind>tk_sequence</kind>
+ <sequence>
+ <elementType>
+ <kind>tk_string</kind>
+ </elementType>
+ </sequence>
+ </type>
+ <value>
+ <element>
+ <string>string_1</string>
+ </element>
+ <element>
+ <string>string_2</string>
+ </element>
+ <element>
+ <string>string_3</string>
+ </element>
+ <element>
+ <string>string_4</string>
+ </element>
+ <element>
+ <string>string_5</string>
+ </element>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+
+ <artifact xmi:id="SetConnectorAttributeConnector_ExecArtifact">
+ <name>SetConnectorAttributeConnector_exec</name>
+ <source/>
+ <node/>
+ <location>DDS_SetConnectorAttributeConnector_exec</location>
+ </artifact>
+ <artifact xmi:id="SetConnectorAttributeConnector_SvntArtifact">
+ <name>SetConnectorAttributeConnector_svnt</name>
+ <source/>
+ <node/>
+ <location>DDS_SetConnectorAttributeConnector_svnt</location>
+ </artifact>
+ <artifact xmi:id="SetConnectorAttributeConnector_StubArtifact">
+ <name>SetConnectorAttributeConnector_stub</name>
+ <source/>
+ <node/>
+ <location>DDS_SetConnectorAttributeConnector_stub</location>
+ </artifact>
+</Deployment:DeploymentPlan>
diff --git a/CIAO/connectors/dds4ccm/tests/SetConnectorAttributes/descriptors/USER_QOS_PROFILES.xml b/CIAO/connectors/dds4ccm/tests/SetConnectorAttributes/descriptors/USER_QOS_PROFILES.xml
new file mode 100644
index 00000000000..5861fdaf470
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/SetConnectorAttributes/descriptors/USER_QOS_PROFILES.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Description
+ XML QoS Profile
+
+ The QoS configuration of the DDS entities in the generated example is
+ loaded from this file.
+
+ This file is used only when it is in the current working directory
+ or when the enviroment variable
+ NDDS_QOS_PROFILES is defined and points to this file.
+
+ For more information about XML QoS Profiles see Chapter 15 in the
+ RTI Data Distribution Service user manual.
+ -->
+<dds xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="c:/ndds/ndds.4.4d/scripts/../resource/rtiddsgen/../qos_profiles_4.4d/schema/rti_dds_qos_profiles.xsd" version="4.4d">
+ <!-- QoS Library containing the QoS profile used in the generated example.
+
+ A QoS library is a named set of QoS profiles.
+ -->
+ <qos_library name="HelloMsg_Library">
+ <!-- QoS profile used to configure reliable communication between the DataWriter
+ and DataReader created in the example code.
+
+ A QoS profile groups a set of related QoS.
+ -->
+ <qos_profile name="HelloMsg_Profile" is_default_qos="true">
+ <!-- QoS used to configure the data writer created in the example code -->
+ <datawriter_qos>
+ <reliability>
+ <kind>RELIABLE_RELIABILITY_QOS</kind>
+ <max_blocking_time>
+ <sec>10</sec>
+ <nanosec>0</nanosec>
+ </max_blocking_time>
+ </reliability>
+ <durability>
+ <kind>TRANSIENT_DURABILITY_QOS</kind>
+ </durability>
+ <history>
+ <kind>KEEP_LAST_HISTORY_QOS</kind>
+ <depth>20</depth>
+ </history>
+ <resource_limits>
+ <max_samples>5</max_samples>
+ <initial_samples>3</initial_samples>
+ </resource_limits>
+ <protocol>
+ <rtps_reliable_writer>
+ <max_heartbeat_retries>10</max_heartbeat_retries>
+ </rtps_reliable_writer>
+ </protocol>
+ </datawriter_qos>
+ <!-- QoS used to configure the data reader created in the example code -->
+ <datareader_qos>
+ <reliability>
+ <kind>RELIABLE_RELIABILITY_QOS</kind>
+ </reliability>
+ <history>
+ <kind>KEEP_LAST_HISTORY_QOS</kind>
+ <depth>20</depth>
+ </history>
+ <durability>
+ <kind>TRANSIENT_LOCAL_DURABILITY_QOS</kind>
+ </durability>
+ </datareader_qos>
+ </qos_profile>
+ </qos_library>
+</dds> \ No newline at end of file
diff --git a/CIAO/connectors/dds4ccm/tests/SetConnectorAttributes/descriptors/run_test.pl b/CIAO/connectors/dds4ccm/tests/SetConnectorAttributes/descriptors/run_test.pl
new file mode 100755
index 00000000000..543e805b3a6
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/SetConnectorAttributes/descriptors/run_test.pl
@@ -0,0 +1,225 @@
+eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
+ & eval 'exec perl -S $0 $argv:q'
+ if 0;
+
+# $Id$
+# -*- perl -*-
+
+use lib "$ENV{'ACE_ROOT'}/bin";
+use PerlACE::TestTarget;
+
+$CIAO_ROOT = "$ENV{'CIAO_ROOT'}";
+$TAO_ROOT = "$ENV{'TAO_ROOT'}";
+$DANCE_ROOT = "$ENV{'DANCE_ROOT'}";
+
+$daemons_running = 0;
+$em_running = 0;
+$ns_running = 0;
+
+$nr_daemon = 1;
+@ports = ( 60001);
+@iorbases = ( "NodeApp1.ior" );
+@iorfiles = 0;
+@nodenames = ( "ComponentNode");
+
+# ior files other than daemon
+# ior files other than daemon
+$ior_nsbase = "ns.ior";
+$ior_nsfile = 0;
+$ior_embase = "EM.ior";
+$ior_emfile = 0;
+
+# Processes
+$E = 0;
+$EM = 0;
+$NS = 0;
+@DEAMONS = 0;
+
+# targets
+@tg_daemons = 0;
+$tg_naming = 0;
+$tg_exe_man = 0;
+$tg_executor = 0;
+
+$status = 0;
+$cdp_file = "Plan.cdp";
+
+PerlACE::add_lib_path ('../lib');
+$ENV{"DANCE_TRACE_ENABLE"} = 0;
+$ENV{"CIAO_TRACE_ENABLE"} = 0;
+
+
+sub create_targets {
+ # naming service
+ $tg_naming = PerlACE::TestTarget::create_target (1) || die "Create target for ns failed\n";
+
+ # daemon
+ for ($i = 0; $i < $nr_daemon; ++$i) {
+ $tg_daemons[$i] = PerlACE::TestTarget::create_target ($i+1) || die "Create target for deamon $i failed\n";
+ }
+ # execution manager
+ $tg_exe_man = PerlACE::TestTarget::create_target (1) || die "Create target for EM failed\n";
+ # executor (plan_launcher)
+ $tg_executor = PerlACE::TestTarget::create_target (1) || die "Create target for executor failed\n";
+}
+
+sub init_ior_files {
+ $ior_nsfile = $tg_naming->LocalFile ($ior_nsbase);
+ $ior_emfile = $tg_exe_man->LocalFile ($ior_embase);
+ for ($i = 0; $i < $nr_daemon; ++$i) {
+ $iorfiles[$i] = $tg_daemons[$i]->LocalFile ($iorbases[$i]);
+ }
+ delete_ior_files ();
+}
+
+# Delete if there are any .ior files.
+sub delete_ior_files {
+ for ($i = 0; $i < $nr_daemon; ++$i) {
+ $tg_daemons[$i]->DeleteFile ($iorbases[$i]);
+ }
+ $tg_naming->DeleteFile ($ior_nsbase);
+ $tg_exe_man->DeleteFile ($ior_embase);
+ for ($i = 0; $i < $nr_daemon; ++$i) {
+ $iorfiles[$i] = $tg_daemons[$i]->LocalFile ($iorbases[$i]);
+ }
+}
+
+sub kill_node_daemon {
+ for ($i = 0; $i < $nr_daemon; ++$i) {
+ $DEAMONS[$i]->Kill (); $DEAMONS[$i]->TimedWait (1);
+ }
+}
+
+sub kill_open_processes {
+ if ($daemons_running == 1) {
+ kill_node_daemon ();
+ }
+
+ if ($em_running == 1) {
+ $EM->Kill (); $EM->TimedWait (1);
+ }
+
+ if ($ns_running == 1) {
+ $NS->Kill (); $NS->TimedWait (1);
+ }
+
+}
+
+sub run_node_daemons {
+ for ($i = 0; $i < $nr_daemon; ++$i) {
+ $iorbase = $iorbases[$i];
+ $iorfile = $iorfiles[$i];
+ $port = $ports[$i];
+ $nodename = $nodenames[$i];
+ $iiop = "iiop://localhost:$port";
+ $node_app = "$CIAO_ROOT/bin/ciao_componentserver";
+
+ $d_cmd = "$DANCE_ROOT/bin/dance_node_manager";
+ $d_param = "-ORBEndpoint $iiop -s $node_app -n $nodename=$iorfile -t 30 --domain-nc corbaloc:rir:/NameService";
+
+ print "Run dance_node_manager with $d_param\n";
+
+ $DEAMONS[$i] = $tg_daemons[$i]->CreateProcess ($d_cmd, $d_param);
+ $result = $DEAMONS[$i]->Spawn ();
+ push(@processes, $DEAMONS[$i]);
+
+ if ($tg_daemons[$i]->WaitForFileTimed($iorbase,
+ $tg_daemons[$i]->ProcessStartWaitInterval ()) == -1) {
+ print STDERR
+ "ERROR: The ior $iorfile file of node daemon $i could not be found\n";
+ for (; $i >= 0; --$i) {
+ $DEAMONS[$i]->Kill (); $DEAMONS[$i]->TimedWait (1);
+ }
+ return -1;
+ }
+ }
+ return 0;
+}
+
+create_targets ();
+init_ior_files ();
+
+# Invoke naming service
+
+$NS = $tg_naming->CreateProcess ("$TAO_ROOT/orbsvcs/Naming_Service/Naming_Service", "-m 1 -ORBEndpoint iiop://localhost:60003 -o $ior_nsfile");
+
+$NS->Spawn ();
+
+print STDERR "Starting Naming Service with -m 1 -ORBEndpoint iiop://localhost:60003 -o ns.ior\n";
+
+if ($tg_naming->WaitForFileTimed ($ior_nsbase,
+ $tg_naming->ProcessStartWaitInterval ()) == -1)
+{
+ print STDERR "ERROR: cannot find naming service IOR file\n";
+ $NS->Kill (); $NS->TimedWait (1);
+ exit 1;
+}
+
+$ns_running = 1;
+# Set up NamingService environment
+$ENV{"NameServiceIOR"} = "corbaloc:iiop:localhost:60003/NameService";
+
+# Invoke node daemon.
+print "Invoking node daemon\n";
+$status = run_node_daemons ();
+
+if ($status != 0) {
+ print STDERR "ERROR: Unable to execute the node daemon\n";
+ kill_open_processes ();
+ exit 1;
+}
+
+$daemons_running = 1;
+
+# Invoke execution manager.
+print "Invoking execution manager (dance_execution_manager.exe) with -e$ior_emfile\n";
+$EM = $tg_exe_man->CreateProcess ("$DANCE_ROOT/bin/dance_execution_manager",
+ "-e$ior_emfile --domain-nc corbaloc:rir:/NameService");
+$EM->Spawn ();
+
+if ($tg_exe_man->WaitForFileTimed ($ior_embase,
+ $tg_exe_man->ProcessStartWaitInterval ()) == -1) {
+ print STDERR
+ "ERROR: The ior file of execution manager could not be found\n";
+ kill_open_processes ();
+ exit 1;
+}
+
+$em_running = 1;
+
+# Invoke executor - start the application -.
+print "Invoking executor - launch the application -\n";
+
+print "Start dance_plan_launcher.exe with -x $cdp_file -k file://$ior_emfile\n";
+$E = $tg_executor->CreateProcess ("$DANCE_ROOT/bin/dance_plan_launcher",
+ "-x $cdp_file -k file://$ior_emfile");
+$E->SpawnWaitKill (2*$tg_executor->ProcessStartWaitInterval ());
+
+for ($i = 0; $i < $nr_daemon; ++$i) {
+ if ($tg_daemons[$i]->WaitForFileTimed ($iorbases[$i],
+ $tg_daemons[$i]->ProcessStopWaitInterval ()) == -1) {
+ print STDERR "ERROR: The ior file of daemon $i could not be found\n";
+ kill_open_processes ();
+ exit 1;
+ }
+}
+
+print "Sleeping 5 seconds to allow task to complete\n";
+sleep (5);
+
+# Invoke executor - stop the application -.
+print "Invoking executor - stop the application -\n";
+print "by running dance_plan_launcher.exe with -k file://$ior_emfile -x $cdp_file -q\n";
+
+$E =
+ new PerlACE::Process ("$DANCE_ROOT/bin/dance_plan_launcher",
+ "-k file://$ior_emfile -x $cdp_file -q");
+$E->SpawnWaitKill ($tg_executor->ProcessStopWaitInterval ());
+
+print "Executor returned.\n";
+print "Shutting down rest of the processes.\n";
+
+delete_ior_files ();
+kill_open_processes ();
+
+exit $status;