diff options
author | dai_y <dai_y@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2010-06-08 20:20:16 +0000 |
---|---|---|
committer | dai_y <dai_y@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2010-06-08 20:20:16 +0000 |
commit | 97acf7bccce85db0cbd81195f72de0ca379d21af (patch) | |
tree | 978e5ede49139091e8308155c07e2dc64add8a90 /TAO | |
parent | 94a52415404409899c46da5bfdb8cc28e1077f80 (diff) | |
download | ATCD-97acf7bccce85db0cbd81195f72de0ca379d21af.tar.gz |
Tue Jun 8 20:17:40 UTC 2010 Yan Dai <dai_y@ociweb.com>
Diffstat (limited to 'TAO')
-rw-r--r-- | TAO/ChangeLog | 13 | ||||
-rw-r--r-- | TAO/NEWS | 2 | ||||
-rw-r--r-- | TAO/tests/Bug_3853_Regression/client.cpp | 40 | ||||
-rw-r--r-- | TAO/tests/Bug_3853_Regression/server.cpp | 4 |
4 files changed, 42 insertions, 17 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index d339e326b94..85f707fe5cc 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,16 @@ +Tue Jun 8 20:17:40 UTC 2010 Yan Dai <dai_y@ociweb.com> + + * tests/Bug_3853_Regression/client.cpp: + * tests/Bug_3853_Regression/server.cpp: + + - Removed excepted exception output and added verification + for reconnecting to server1. + - Fixed compilation errors on wchar builds. + + * NEWS: + + Added entry for bug #3853 fix. + Tue Jun 8 15:20:00 UTC 2010 Simon Massey <simon dot massey at prismtech dot com> * NEWS: @@ -1,6 +1,8 @@ USER VISIBLE CHANGES BETWEEN TAO-1.7.9 and TAO-1.8.0 ==================================================== +. Fixed bugzilla #3853. + . Improved the speed of tao_idl when processing large input files with many module re-openings. diff --git a/TAO/tests/Bug_3853_Regression/client.cpp b/TAO/tests/Bug_3853_Regression/client.cpp index 49215f0a804..887be3369ba 100644 --- a/TAO/tests/Bug_3853_Regression/client.cpp +++ b/TAO/tests/Bug_3853_Regression/client.cpp @@ -5,6 +5,7 @@ #include "tao/ORBInitializer_Registry.h" #include "tao/PI_Server/PI_Server.h" +#include "tao/Debug.h" #include "ace/Task.h" #include "ace/OS.h" #include "ace/Get_Opt.h" @@ -20,6 +21,8 @@ CORBA::ORB_var orb; Demo::HelloWorld_var server1_shutdownObj; Demo::HelloWorld_var server2_shutdownObj; int test_duration = 30; +bool reconnected = false; +bool caught_exception = false; class ClientTask : public ACE_Task_Base { @@ -54,22 +57,22 @@ public: const char* pMsg = " server1 say Hello"; hello->sayHello(pMsg) ; ACE_OS::sleep(2); + + if (caught_exception) { + // Reconncted to server 1 + ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t) client reconnected to server 1\n"))); + reconnected = true; + } } - catch (const CORBA::OBJECT_NOT_EXIST &) - { - ACE_ERROR ((LM_ERROR, ACE_TEXT ("sayHello() got OBJECT_NOT_EXIST exception !!\n"))); - } - catch (const CORBA::INV_OBJREF &) - { - ACE_ERROR ((LM_ERROR, ACE_TEXT ("sayHello() got INV_OBJREF exception !!\n"))); - } - catch (const CORBA::COMM_FAILURE &) - { - ACE_ERROR ((LM_ERROR, ACE_TEXT ("sayHello() got COMM_FAILURE exception !!\n"))); + catch (const CORBA::TRANSIENT &) + { + caught_exception = true; + if (TAO_debug_level > 0) { + ACE_DEBUG((LM_DEBUG, ACE_TEXT ("sayHello() expected TRANSIENT exceptions.\n"))); + } } - catch (const CORBA::Exception &ex) - { - ex._tao_print_exception ("sayHello()"); + catch (...) { + ACE_ERROR((LM_ERROR, ACE_TEXT ("sayHello() caught unknown exception\n"))); } } } @@ -79,7 +82,7 @@ public: int -parse_args (int argc, char *argv[]) +parse_args (int argc, ACE_TCHAR *argv[]) { ACE_Get_Opt get_opts (argc, argv, "t:"); int c; @@ -167,6 +170,13 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) orb->destroy (); orb = CORBA::ORB::_nil (); + + if (!reconnected) { + ACE_ERROR_RETURN ((LM_ERROR, + "Client was not able to reconnect to server 1.\n"), + 1); + return 1; + } } catch (const CORBA::Exception &e) { diff --git a/TAO/tests/Bug_3853_Regression/server.cpp b/TAO/tests/Bug_3853_Regression/server.cpp index 5a88b633bdd..0a3b55f6038 100644 --- a/TAO/tests/Bug_3853_Regression/server.cpp +++ b/TAO/tests/Bug_3853_Regression/server.cpp @@ -7,8 +7,8 @@ #include <fstream> #include <iostream> -const ACE_TCHAR *ior_output_file = ""; -const ACE_TCHAR *shutdown_ior_output_file = ""; +const ACE_TCHAR *ior_output_file = ACE_TEXT(""); +const ACE_TCHAR *shutdown_ior_output_file = ACE_TEXT(""); int parse_args (int argc, ACE_TCHAR *argv[]) |