diff options
author | mcorino <mcorino@users.noreply.github.com> | 2006-11-08 14:15:23 +0000 |
---|---|---|
committer | mcorino <mcorino@users.noreply.github.com> | 2006-11-08 14:15:23 +0000 |
commit | a127383e5648c995f3e54181b618d3db063526df (patch) | |
tree | 736643e70d3a9635f255fce444de6c1b5f4c0c6c | |
parent | e62f6c4267f983aea3a0c764d267a2ab0372c54d (diff) | |
download | ATCD-a127383e5648c995f3e54181b618d3db063526df.tar.gz |
ChangeLogTag: Wed Nov 8 14:12:12 UTC 2006 Martin Corino <mcorino@remedy.nl>
-rw-r--r-- | TAO/ChangeLog | 9 | ||||
-rw-r--r-- | TAO/tests/AMH_Exceptions/Test.idl | 2 | ||||
-rw-r--r-- | TAO/tests/AMH_Exceptions/client.cpp | 21 | ||||
-rwxr-xr-x | TAO/tests/AMH_Exceptions/run_test.pl | 2 | ||||
-rw-r--r-- | TAO/tests/AMH_Exceptions/server.cpp | 12 |
5 files changed, 36 insertions, 10 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index de85dbd9da0..82d7b2827bc 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,12 @@ +Wed Nov 8 14:12:12 UTC 2006 Martin Corino <mcorino@remedy.nl> + + * tests/AMH_Exceptions/Test.idl: + * tests/AMH_Exceptions/server.cpp: + * tests/AMH_Exceptions/client.cpp: + * tests/AMH_Exceptions/run_test.pl: + + Added clean shutdown option. + Wed Nov 8 13:22:12 UTC 2006 Martin Corino <mcorino@remedy.nl> * tests/Muxing/Test.idl: diff --git a/TAO/tests/AMH_Exceptions/Test.idl b/TAO/tests/AMH_Exceptions/Test.idl index c3ffd609ca4..6a9ae77044b 100644 --- a/TAO/tests/AMH_Exceptions/Test.idl +++ b/TAO/tests/AMH_Exceptions/Test.idl @@ -23,6 +23,8 @@ module Test { Timestamp test_method (in Timestamp send_time) raises (InvalidTimestamp, ServerOverload); + + oneway void shutdown (); }; }; diff --git a/TAO/tests/AMH_Exceptions/client.cpp b/TAO/tests/AMH_Exceptions/client.cpp index 9ff92b2933d..60dbc3e8da3 100644 --- a/TAO/tests/AMH_Exceptions/client.cpp +++ b/TAO/tests/AMH_Exceptions/client.cpp @@ -30,14 +30,19 @@ main (int argc, char *argv[]) 1); } - Test::Timestamp time = 10; - roundtrip->test_method (time ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - } - ACE_CATCH(Test::ServerOverload, ov) - { - ACE_DEBUG ((LM_DEBUG, "Received expected exception\n")); - received_expected_exception = 1; + ACE_TRY { + Test::Timestamp time = 10; + roundtrip->test_method (time ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + } + ACE_CATCH(Test::ServerOverload, ov) + { + ACE_DEBUG ((LM_DEBUG, "Received expected exception\n")); + received_expected_exception = 1; + + roundtrip->shutdown (); + } + ACE_ENDTRY; } ACE_CATCHANY { diff --git a/TAO/tests/AMH_Exceptions/run_test.pl b/TAO/tests/AMH_Exceptions/run_test.pl index 11dc1f3e86a..7bd307293bf 100755 --- a/TAO/tests/AMH_Exceptions/run_test.pl +++ b/TAO/tests/AMH_Exceptions/run_test.pl @@ -42,7 +42,7 @@ if (PerlACE::waitforfile_timed ($iorfile, $sleeptime) == -1) { $client = $CL->SpawnWaitKill (30); # Clean up. -$amhserver= $AMH->TerminateWaitKill (5); +$amhserver= $AMH->WaitKill (15); if ($amhserver != 0) { print STDERR "ERROR: AMH Server returned $amhserver\n"; diff --git a/TAO/tests/AMH_Exceptions/server.cpp b/TAO/tests/AMH_Exceptions/server.cpp index 05d82934074..4bc543e5537 100644 --- a/TAO/tests/AMH_Exceptions/server.cpp +++ b/TAO/tests/AMH_Exceptions/server.cpp @@ -3,6 +3,7 @@ #include "ace/OS_NS_stdio.h" #include "TestS.h" +#include "tao/ORB_Core.h" /***************************/ /*** Servant Declaration ***/ @@ -18,6 +19,9 @@ public: ACE_ENV_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); + void shutdown (Test::AMH_RoundtripResponseHandler_ptr _tao_rh ACE_ENV_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)); + protected: CORBA::ORB_ptr orb_; }; @@ -56,6 +60,12 @@ ST_AMH_Servant::test_method (Test::AMH_RoundtripResponseHandler_ptr _tao_rh, ACE_UNUSED_ARG (send_time); } +void +ST_AMH_Servant::shutdown (Test::AMH_RoundtripResponseHandler_ptr /*_tao_rh*/ ACE_ENV_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER); +} /*** Server Declaration ***/ @@ -192,7 +202,7 @@ ST_AMH_Server::run_event_loop () ACE_TRY { ACE_Time_Value period (0, 11000); - while (1) + while (!this->orb_->orb_core ()->has_shutdown ()) { this->orb_->perform_work (&period); ACE_TRY_CHECK; |