diff options
Diffstat (limited to 'TAO/tests')
-rw-r--r-- | TAO/tests/AMI/ami_test.idl | 10 | ||||
-rw-r--r-- | TAO/tests/Bug_1676_Regression/client.cpp | 48 | ||||
-rw-r--r-- | TAO/tests/DLL_ORB/Test_Client_Module.cpp | 56 | ||||
-rw-r--r-- | TAO/tests/DLL_ORB/Test_Server_Module.cpp | 40 | ||||
-rw-r--r-- | TAO/tests/ORT/ORT_test_IORInterceptor.cpp | 2 | ||||
-rw-r--r-- | TAO/tests/ORT/ORT_test_IORInterceptor.h | 2 | ||||
-rw-r--r-- | TAO/tests/POA/README | 14 | ||||
-rw-r--r-- | TAO/tests/Param_Test/svc.conf | 2 | ||||
-rw-r--r-- | TAO/tests/Portable_Interceptors/IORInterceptor/FOO_IORInterceptor.cpp | 2 | ||||
-rw-r--r-- | TAO/tests/Portable_Interceptors/IORInterceptor/FOO_IORInterceptor.h | 2 | ||||
-rw-r--r-- | TAO/tests/Sequence_Unit_Tests/Sequence_Unit_Tests.mpc | 8 | ||||
-rw-r--r-- | TAO/tests/Smart_Proxies/Benchmark/client.cpp | 2 | ||||
-rw-r--r-- | TAO/tests/Smart_Proxies/Policy/client.cpp | 2 | ||||
-rw-r--r-- | TAO/tests/Smart_Proxies/client.cpp | 2 | ||||
-rw-r--r-- | TAO/tests/Smart_Proxies/dtor/client.cpp | 2 |
15 files changed, 118 insertions, 76 deletions
diff --git a/TAO/tests/AMI/ami_test.idl b/TAO/tests/AMI/ami_test.idl index 82256ab3c10..ffdc66d63d5 100644 --- a/TAO/tests/AMI/ami_test.idl +++ b/TAO/tests/AMI/ami_test.idl @@ -15,7 +15,7 @@ -module A +module A { exception DidTheRightThing { long id; @@ -24,15 +24,15 @@ module A interface AMI_Test { - long foo (out long out_l, + long foo (out long out_l, in long in_l, in string in_str) raises (DidTheRightThing); - + attribute long yadda; - + oneway void shutdown (); - + void inout_arg_test (inout string str); }; diff --git a/TAO/tests/Bug_1676_Regression/client.cpp b/TAO/tests/Bug_1676_Regression/client.cpp index 2e2ec401a29..9687e3ec488 100644 --- a/TAO/tests/Bug_1676_Regression/client.cpp +++ b/TAO/tests/Bug_1676_Regression/client.cpp @@ -33,6 +33,8 @@ parse_args (int argc, char *argv[]) return 0; } +void get_stringList2(Test::Hello_var hello); + int main (int argc, char *argv[]) { @@ -63,7 +65,7 @@ main (int argc, char *argv[]) ACE_DEBUG ((LM_DEBUG, "\n(%P|%t) - get_stringList\n")); - Test::StringList_var seq = + Test::StringList_var seq = hello->get_stringList (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; @@ -71,7 +73,7 @@ main (int argc, char *argv[]) CORBA::String_var the_string = CORBA::string_dup ((*seq)[i]); ACE_DEBUG ((LM_DEBUG, "(%P|%t) - string returned <%s>\n", the_string.in ())); - } + } ACE_DEBUG ((LM_DEBUG, "\n(%P|%t) - get_stringList2 with initialization\n")); @@ -83,18 +85,11 @@ main (int argc, char *argv[]) CORBA::String_var the_string = seq2.in()[i]; ACE_DEBUG ((LM_DEBUG, "(%P|%t) - string returned <%s>\n", the_string.in ())); - } + } ACE_DEBUG ((LM_DEBUG, "\n(%P|%t) - get_stringList2 without initialization\n")); - hello->get_stringList2(false, seq2.out()); - ACE_TRY_CHECK; - - for (CORBA::ULong i = 0; i<seq2->length(); i++) { - CORBA::String_var the_string = seq2.in()[i]; - ACE_DEBUG ((LM_DEBUG, "(%P|%t) - string returned <%s>\n", - the_string.in ())); - } + get_stringList2(hello); ACE_DEBUG ((LM_DEBUG, "\n(%P|%t) - mod_stringList\n")); @@ -123,3 +118,34 @@ main (int argc, char *argv[]) return 0; } + +void get_stringList2(Test::Hello_var hello) +{ + Test::StringList_var seq2; + + ACE_TRY_NEW_ENV + { + // Shutdown the ORB and block until the shutdown is complete. + hello->get_stringList2(false, seq2.out()); + ACE_TRY_CHECK; + + for (CORBA::ULong i = 0; i<seq2->length(); i++) { + CORBA::String_var the_string = seq2.in()[i]; + ACE_DEBUG ((LM_DEBUG, "(%P|%t) - string returned <%s>\n", + the_string.in ())); + } + } + ACE_CATCH(CORBA::BAD_PARAM, ex) + { + ACE_DEBUG ((LM_DEBUG, "(%P|%t) - catched expected exception BAD_PARAM\n")); + } + ACE_CATCHANY + { + ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, + "get_stringList2"); + } + ACE_ENDTRY; + + + return; +} diff --git a/TAO/tests/DLL_ORB/Test_Client_Module.cpp b/TAO/tests/DLL_ORB/Test_Client_Module.cpp index 9deb390c8ee..0408425d5b4 100644 --- a/TAO/tests/DLL_ORB/Test_Client_Module.cpp +++ b/TAO/tests/DLL_ORB/Test_Client_Module.cpp @@ -90,7 +90,7 @@ Test_Client_Module::init (int argc, char *argv[]) // Initialize the ORB. this->orb_ = CORBA::ORB_init (new_argc, new_argv.get_buffer (), - "" + "CLIENT" ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; @@ -142,33 +142,8 @@ Test_Client_Module::init (int argc, char *argv[]) int Test_Client_Module::fini (void) { - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY - { - // Make sure the ORB is destroyed. - if (!CORBA::is_nil (this->orb_.in ())) - { - this->orb_->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - } - } - ACE_CATCHANY - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - ACE_TEXT ("Test_Client_Module::fini")); - return -1; - } - ACE_ENDTRY; - ACE_CHECK_RETURN (-1); - - // This is a bit of a hack. The ORB Core's lifetime is tied to the - // lifetime of an object reference. We need to wipe out all object - // references before we call fini() on the TAO_Singleton_Manager. - // - // Note that this is only necessary if the default resource factory - // is used, i.e. one isn't explicitly loaded prior to initializing - // the ORB. - (void) this->test_.out (); + ACE_DEBUG ((LM_INFO, + "Client is being finalized.\n")); // ------------------------------------------------------------ // Pre-Test_Client_Module termination steps. @@ -197,6 +172,31 @@ Test_Client_Module::svc (void) /// Shutdown the remote ORB. this->test_->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; + + // Make sure the ORB is destroyed here - before the thread + // exits, because it may be holding global resources, owned by + // the Object Manager (thru its core, which is in turn owned by + // the ORB table; which is owned by the Object Manager). + // Otherwise the Object Manager will have clobbered them by the + // time it gets to destroy the ORB Table, which calls our + // fini(). Had we destroyed the ORB in our fini(), its core + // fininalization would have required access to those already + // deleted resources. + if (!CORBA::is_nil (this->orb_.in ())) + { + this->orb_->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + } + + // This is a bit of a hack. The ORB Core's lifetime is tied to the + // lifetime of an object reference. We need to wipe out all object + // references before we call fini() on the TAO_Singleton_Manager. + // + // Note that this is only necessary if the default resource factory + // is used, i.e. one isn't explicitly loaded prior to initializing + // the ORB. + (void) this->test_.out (); + } ACE_CATCHANY { diff --git a/TAO/tests/DLL_ORB/Test_Server_Module.cpp b/TAO/tests/DLL_ORB/Test_Server_Module.cpp index 09604d041e7..bb590b53b1e 100644 --- a/TAO/tests/DLL_ORB/Test_Server_Module.cpp +++ b/TAO/tests/DLL_ORB/Test_Server_Module.cpp @@ -91,7 +91,7 @@ Test_Server_Module::init (int argc, char *argv[]) // Initialize the ORB. this->orb_ = CORBA::ORB_init (new_argc, new_argv.get_buffer (), - 0 + "SERVER" ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; @@ -169,24 +169,8 @@ Test_Server_Module::init (int argc, char *argv[]) int Test_Server_Module::fini (void) { - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY - { - // Make sure the ORB is destroyed. - if (!CORBA::is_nil (this->orb_.in ())) - { - this->orb_->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - } - } - ACE_CATCHANY - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - ACE_TEXT ("Test_Server_Module::fini")); - return -1; - } - ACE_ENDTRY; - ACE_CHECK_RETURN (-1); + ACE_DEBUG ((LM_INFO, + "Server is being finalized.\n")); // ------------------------------------------------------------ // Pre-Test_Server_Module termination steps. @@ -211,6 +195,24 @@ Test_Server_Module::svc (void) // Run the ORB event loop in its own thread. this->orb_->run (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; + + ACE_DEBUG ((LM_INFO, + "Server is being destroyed.\n")); + + // Make sure the ORB is destroyed here - before the thread + // exits, because it may be holding global resources, owned by + // the Object Manager (thru its core, which is in turn owned by + // the ORB table; which is owned by the Object Manager). + // Otherwise the Object Manager will have clobbered them by the + // time it gets to destroy the ORB Table, which calls our + // fini(). Had we destroyed the ORB in our fini(), its core + // fininalization would have required access to those already + // deleted resources. + if (!CORBA::is_nil (this->orb_.in ())) + { + this->orb_->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + } } ACE_CATCHANY { diff --git a/TAO/tests/ORT/ORT_test_IORInterceptor.cpp b/TAO/tests/ORT/ORT_test_IORInterceptor.cpp index 33ecd4d3399..7a7a3a2943e 100644 --- a/TAO/tests/ORT/ORT_test_IORInterceptor.cpp +++ b/TAO/tests/ORT/ORT_test_IORInterceptor.cpp @@ -82,7 +82,7 @@ ORT_test_IORInterceptor::components_established ( void ORT_test_IORInterceptor::adapter_manager_state_changed ( - PortableInterceptor::AdapterManagerId, + const char * id, PortableInterceptor::AdapterState ACE_ENV_ARG_DECL_NOT_USED) ACE_THROW_SPEC ((CORBA::SystemException)) diff --git a/TAO/tests/ORT/ORT_test_IORInterceptor.h b/TAO/tests/ORT/ORT_test_IORInterceptor.h index 65ef1bf0f4e..14e17c49529 100644 --- a/TAO/tests/ORT/ORT_test_IORInterceptor.h +++ b/TAO/tests/ORT/ORT_test_IORInterceptor.h @@ -66,7 +66,7 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); virtual void adapter_manager_state_changed ( - PortableInterceptor::AdapterManagerId id, + const char * id, PortableInterceptor::AdapterState state ACE_ENV_ARG_DECL_WITH_DEFAULTS) ACE_THROW_SPEC ((CORBA::SystemException)); diff --git a/TAO/tests/POA/README b/TAO/tests/POA/README index a62f8269c50..9d4a03425d2 100644 --- a/TAO/tests/POA/README +++ b/TAO/tests/POA/README @@ -81,3 +81,17 @@ Object Adapter (POA) interfaces and their usage scenarios. This program tests that nested non-servant upcalls are handled correctly. + . POAManagerFactory + + The program tests the POAManagerFactory interface. Test may + be run by hand using "POAManagerFactory -v" to get a verbose + report of individual tests being run. + + . EndpointPolicy + + Tests for the endpoint policy, the server listens on two + endpoints, one with an alias rendering it unreachable. The + server uses the endpoint policy to create two IORs, one with + the only the good endpoint and another with only the bad. The + client expects to reach the good ior and expects to fail with + the bad ior. diff --git a/TAO/tests/Param_Test/svc.conf b/TAO/tests/Param_Test/svc.conf index f2f882ba2f4..d63ac264118 100644 --- a/TAO/tests/Param_Test/svc.conf +++ b/TAO/tests/Param_Test/svc.conf @@ -3,5 +3,5 @@ # Please read $TAO_ROOT/docs/Options.html for details. # -static Resource_Factory "-ORBNativeWCharCodeset 0x00010109" +#static Resource_Factory "-ORBNativeWCharCodeset 0x00010109" static Server_Strategy_Factory "-ORBtablesize 128" diff --git a/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_IORInterceptor.cpp b/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_IORInterceptor.cpp index b8c44b203e0..c29013285ff 100644 --- a/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_IORInterceptor.cpp +++ b/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_IORInterceptor.cpp @@ -181,7 +181,7 @@ FOO_IORInterceptor::components_established ( void FOO_IORInterceptor::adapter_manager_state_changed ( - PortableInterceptor::AdapterManagerId , + const char *, PortableInterceptor::AdapterState ACE_ENV_ARG_DECL_NOT_USED) ACE_THROW_SPEC ((CORBA::SystemException)) diff --git a/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_IORInterceptor.h b/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_IORInterceptor.h index 699083a8fde..4fc980070d1 100644 --- a/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_IORInterceptor.h +++ b/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_IORInterceptor.h @@ -78,7 +78,7 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); virtual void adapter_manager_state_changed ( - PortableInterceptor::AdapterManagerId id, + const char * id, PortableInterceptor::AdapterState state ACE_ENV_ARG_DECL_WITH_DEFAULTS) ACE_THROW_SPEC (( diff --git a/TAO/tests/Sequence_Unit_Tests/Sequence_Unit_Tests.mpc b/TAO/tests/Sequence_Unit_Tests/Sequence_Unit_Tests.mpc index b747a2264b8..b763787544e 100644 --- a/TAO/tests/Sequence_Unit_Tests/Sequence_Unit_Tests.mpc +++ b/TAO/tests/Sequence_Unit_Tests/Sequence_Unit_Tests.mpc @@ -31,6 +31,14 @@ project(*Bounded_String) : taoexe { } } +project(*UB_Arr_Seq): taoexe, boost_unit_test_framework { + exename = unbounded_array_sequence_ut + Source_Files { + mock_array.cpp + unbounded_array_sequence_ut.cpp + } +} + project(*Obj_Ref_Seq_Elem): taoexe, boost_unit_test_framework { exename = object_reference_sequence_element_ut Source_Files { diff --git a/TAO/tests/Smart_Proxies/Benchmark/client.cpp b/TAO/tests/Smart_Proxies/Benchmark/client.cpp index 6867bd8560d..9be492b2cf3 100644 --- a/TAO/tests/Smart_Proxies/Benchmark/client.cpp +++ b/TAO/tests/Smart_Proxies/Benchmark/client.cpp @@ -151,8 +151,6 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) Smart_Test_Factory, -1); - // To make KAI Compiler happy as it considers <test_factory> to be - // an unused variable. ACE_UNUSED_ARG (test_factory); } diff --git a/TAO/tests/Smart_Proxies/Policy/client.cpp b/TAO/tests/Smart_Proxies/Policy/client.cpp index e8853ed58ea..04331a0df03 100644 --- a/TAO/tests/Smart_Proxies/Policy/client.cpp +++ b/TAO/tests/Smart_Proxies/Policy/client.cpp @@ -137,8 +137,6 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) Smart_Test_Factory (one_shot_factory), -1); - // To make KAI Compiler happy as it considers <test_factory> to be - // an unused variable. ACE_UNUSED_ARG (test_factory); run_test (orb.in (), 1); diff --git a/TAO/tests/Smart_Proxies/client.cpp b/TAO/tests/Smart_Proxies/client.cpp index 94dd6b472c0..312191a87f5 100644 --- a/TAO/tests/Smart_Proxies/client.cpp +++ b/TAO/tests/Smart_Proxies/client.cpp @@ -86,8 +86,6 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) Smart_Test_Factory, -1); - // To make KAI Compiler happy as it considers <test_factory> to be - // an unused variable. ACE_UNUSED_ARG (test_factory); Test_var server = diff --git a/TAO/tests/Smart_Proxies/dtor/client.cpp b/TAO/tests/Smart_Proxies/dtor/client.cpp index 9429a29675d..73afdac32dc 100644 --- a/TAO/tests/Smart_Proxies/dtor/client.cpp +++ b/TAO/tests/Smart_Proxies/dtor/client.cpp @@ -60,8 +60,6 @@ int ACE_TMAIN (int argc, ACE_TCHAR* argv[]) Test_Smart_Factory, -1); - // To make KAI Compiler happy as it considers <test_factory> to be - // an unused variable. ACE_UNUSED_ARG (test_factory); Test_var server = |