diff options
author | bala <bala@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-10-28 18:31:01 +0000 |
---|---|---|
committer | bala <bala@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-10-28 18:31:01 +0000 |
commit | cdb6fd66611283a0314ab23e08472d11dae4f0e4 (patch) | |
tree | fd6ae8c3db752254802dfaafd1543974a4741e47 /TAO/tests/Portable_Interceptors/AMI/client.cpp | |
parent | f984aa2bff444f381570d2f97ac9ba958926fb6b (diff) | |
download | ATCD-cdb6fd66611283a0314ab23e08472d11dae4f0e4.tar.gz |
ChangeLogTag:Tue Oct 28 12:02:47 2003 Balachandran Natarajan <bala@dre.vanderbilt.edu>
Diffstat (limited to 'TAO/tests/Portable_Interceptors/AMI/client.cpp')
-rw-r--r-- | TAO/tests/Portable_Interceptors/AMI/client.cpp | 51 |
1 files changed, 34 insertions, 17 deletions
diff --git a/TAO/tests/Portable_Interceptors/AMI/client.cpp b/TAO/tests/Portable_Interceptors/AMI/client.cpp index 0d75ad80413..977ca1cd616 100644 --- a/TAO/tests/Portable_Interceptors/AMI/client.cpp +++ b/TAO/tests/Portable_Interceptors/AMI/client.cpp @@ -1,9 +1,12 @@ #include "Echo_Handler.h" #include "Client_ORBInitializer.h" #include "Client_Interceptor.h" + +#include "tao/ORBInitializer_Registry.h" + #include "ace/Get_Opt.h" #include "ace/Log_Msg.h" - +#include <iostream> ACE_RCSID (AMI, client, @@ -128,8 +131,9 @@ main (int argc, char *argv[]) return exit_status; } -static void test_synchronous (Test::Echo_ptr echo - ACE_ENV_ARG_DECL) +static void +test_synchronous (Test::Echo_ptr echo + ACE_ENV_ARG_DECL) { unsigned long initial_request_count = Echo_Client_Request_Interceptor::request_count; @@ -160,15 +164,17 @@ static void test_synchronous (Test::Echo_ptr echo } } -static void test_ami (Test::Echo_ptr echo - ACE_ENV_ARG_DECL) +static void +test_ami (Test::Echo_ptr echo + ACE_ENV_ARG_DECL) { Test::AMI_EchoHandler_var echo_handler; { Echo_Handler * echo_handler_impl = new Echo_Handler; PortableServer::ServantBase_var safe_echo_handler = echo_handler_impl; - echo_handler = echo_handler_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER); + echo_handler = + echo_handler_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; } @@ -179,7 +185,7 @@ static void test_ami (Test::Echo_ptr echo for (unsigned long i = 0; i != ITERATIONS; ++i) { - echo->sendc_echo_operation( + echo->sendc_echo_operation ( echo_handler.in (), "dummy message" ACE_ENV_ARG_PARAMETER); ACE_CHECK; } @@ -193,16 +199,17 @@ static void test_ami (Test::Echo_ptr echo || total_other_count != ITERATIONS) { ACE_ERROR((LM_ERROR, - "ERROR: In test_ami() unexpected request/other " + "ERROR: In test_ami () unexpected request/other " "count (request = %d, other = %d)\n", total_request_count, total_other_count)); exit_status = 1; } } -static void wait_for_exception (CORBA::ORB_ptr orb, - Test::Echo_ptr echo - ACE_ENV_ARG_DECL) +static void +wait_for_exception (CORBA::ORB_ptr orb, + Test::Echo_ptr echo + ACE_ENV_ARG_DECL) { ACE_Time_Value tv (1, 0); orb->run (tv ACE_ENV_ARG_PARAMETER); @@ -231,13 +238,21 @@ static void wait_for_exception (CORBA::ORB_ptr orb, ACE_CHECK; } -static void test_ami_errors (CORBA::ORB_ptr orb, - Test::Echo_ptr echo - ACE_ENV_ARG_DECL) +static void +test_ami_errors (CORBA::ORB_ptr orb, + Test::Echo_ptr echo + ACE_ENV_ARG_DECL) { - wait_for_exception(orb, echo ACE_ENV_ARG_PARAMETER); + + wait_for_exception (orb, echo ACE_ENV_ARG_PARAMETER); ACE_CHECK; +#if 0 + // Definitely need a better way to test exceptions here. This used + // to work with older versions of the generated code but not + // anymore. The reason is that the starting interception point is + // shifted into the ORB. Unless or otherwise a profile is ready we + // don't invoke this. Test::AMI_EchoHandler_var echo_handler; { Echo_Handler * echo_handler_impl = new Echo_Handler; @@ -256,8 +271,8 @@ static void test_ami_errors (CORBA::ORB_ptr orb, { ACE_TRY { - echo->sendc_echo_operation( - echo_handler.in(), "dummy message" ACE_ENV_ARG_PARAMETER); + echo->sendc_echo_operation ( + echo_handler.in (), "dummy message" ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY @@ -281,4 +296,6 @@ static void test_ami_errors (CORBA::ORB_ptr orb, exit_status = 1; } +#endif /*if 0*/ + } |