diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2011-11-17 11:31:46 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2011-11-17 11:31:46 +0000 |
commit | 5d14385618b151acddb6899791765d7cb828a773 (patch) | |
tree | d430a7aa5844a2b6ce33f6c637271a3f2f1f76a2 | |
parent | a3aef4a51192a5d030b246a0520bcecc728a6c21 (diff) | |
download | ATCD-5d14385618b151acddb6899791765d7cb828a773.tar.gz |
Thu Nov 17 11:30:59 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl>
* tests/ForwardUponObjectNotExist/client.cpp:
First shutdown the ORB before destroying it
-rw-r--r-- | TAO/ChangeLog | 5 | ||||
-rwxr-xr-x | TAO/tests/ForwardUponObjectNotExist/client.cpp | 27 |
2 files changed, 19 insertions, 13 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 14bfa0ab7b7..1acf9b3d38b 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,8 @@ +Thu Nov 17 11:30:59 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * tests/ForwardUponObjectNotExist/client.cpp: + First shutdown the ORB before destroying it + Thu Nov 17 10:05:08 UTC 2011 Martin Corino <mcorino@remedy.nl> Merged changes from Remedy work branch. diff --git a/TAO/tests/ForwardUponObjectNotExist/client.cpp b/TAO/tests/ForwardUponObjectNotExist/client.cpp index 70666db32e1..33a50754c6d 100755 --- a/TAO/tests/ForwardUponObjectNotExist/client.cpp +++ b/TAO/tests/ForwardUponObjectNotExist/client.cpp @@ -6,9 +6,9 @@ const ACE_TCHAR *ior = ACE_TEXT("file://test.ior"); int nthreads = 1; -int do_shutdown = 0; +bool do_shutdown = 0; static const ACE_TCHAR corbaloc_prefix[] = ACE_TEXT("corbaloc:"); -int expected_object_not_exist = 0; +bool expected_object_not_exist = false; int parse_args (int argc, ACE_TCHAR *argv[]) @@ -20,7 +20,7 @@ parse_args (int argc, ACE_TCHAR *argv[]) switch (c) { case 'x': - do_shutdown = 1; + do_shutdown = true; break; case 'k': @@ -54,22 +54,21 @@ parse_args (int argc, ACE_TCHAR *argv[]) class Worker : public ACE_Task_Base { public: + /// Constructor Worker (CORBA::ORB_ptr orb); - // Constructor + /// The actual implementation of the test virtual void run_test (void); - // The actual implementation of the test - // = The Task_Base methods virtual int svc (void); - // Caught OBJECT_NOT_EXIST exception ? - int got_object_not_exist () const; + /// Caught OBJECT_NOT_EXIST exception ? + bool got_object_not_exist () const; private: CORBA::ORB_var orb_; // The ORB reference - int got_object_not_exist_; + bool got_object_not_exist_; }; int @@ -111,10 +110,12 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) server->shutdown (); } - orb->destroy (); + orb->shutdown (); worker.thr_mgr ()->wait (); + orb->destroy (); + if (worker.got_object_not_exist () != expected_object_not_exist) { ACE_ERROR_RETURN ((LM_ERROR, @@ -139,7 +140,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) Worker::Worker (CORBA::ORB_ptr orb) : orb_ (CORBA::ORB::_duplicate (orb)), - got_object_not_exist_ (0) + got_object_not_exist_ (false) { } @@ -152,7 +153,7 @@ Worker::svc (void) } catch (const CORBA::OBJECT_NOT_EXIST &) { - got_object_not_exist_ = 1; + got_object_not_exist_ = true; } catch (...) { @@ -187,7 +188,7 @@ Worker::run_test (void) r)); } -int +bool Worker::got_object_not_exist () const { return got_object_not_exist_; |