diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2010-09-08 13:44:26 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2010-09-08 13:44:26 +0000 |
commit | fe7fd971374ebd99ca4007927e07656c89afbd2c (patch) | |
tree | caee2c60d8d7773b8103f50fd26ce990718abac2 /TAO/tests/ForwardOnceUponException | |
parent | 6da6a5a3ddf69472767335eb14a6dd72003d2544 (diff) | |
download | ATCD-fe7fd971374ebd99ca4007927e07656c89afbd2c.tar.gz |
Wed Sep 8 13:14:03 UTC 2010 Johnny Willemsen <jwillemsen@remedy.nl>
* *.cpp:
Removed RCS_ID
Diffstat (limited to 'TAO/tests/ForwardOnceUponException')
-rwxr-xr-x | TAO/tests/ForwardOnceUponException/client.cpp | 28 | ||||
-rwxr-xr-x | TAO/tests/ForwardOnceUponException/server.cpp | 4 | ||||
-rwxr-xr-x | TAO/tests/ForwardOnceUponException/test_i.cpp | 7 |
3 files changed, 17 insertions, 22 deletions
diff --git a/TAO/tests/ForwardOnceUponException/client.cpp b/TAO/tests/ForwardOnceUponException/client.cpp index 75910c8096d..41a4cc13579 100755 --- a/TAO/tests/ForwardOnceUponException/client.cpp +++ b/TAO/tests/ForwardOnceUponException/client.cpp @@ -7,8 +7,6 @@ #include "ace/streams.h" #include "tao/Invocation_Utils.h" -ACE_RCSID(ForwardOnceUponException, client, "$Id$") - const ACE_TCHAR *ior = ACE_TEXT("file://test.ior"); int nthreads = 1; int do_shutdown = 0; @@ -83,7 +81,7 @@ public: // Return number of received exceptions. int num_received_ex () const; - // Is test done ? + // Is test done ? void done (); private: @@ -120,9 +118,9 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) int timeout = 30; int now = 0; - while (now < timeout - && ((expect_ex_kind != TAO::FOE_NON - && worker.received_ex_kind () != expect_ex_kind + while (now < timeout + && ((expect_ex_kind != TAO::FOE_NON + && worker.received_ex_kind () != expect_ex_kind && worker.num_received_ex () != expect_num_ex) || expect_ex_kind == TAO::FOE_NON)) { @@ -152,16 +150,16 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) worker.thr_mgr ()->wait (); - if (worker.received_ex_kind () != expect_ex_kind + if (worker.received_ex_kind () != expect_ex_kind || worker.num_received_ex () != expect_num_ex) { ACE_ERROR_RETURN ((LM_ERROR, ("(%P|%t)client: test failed - expected is different from received. " - "expected %d/%d received %d/%d.\n"), + "expected %d/%d received %d/%d.\n"), expect_ex_kind, expect_num_ex, worker.received_ex_kind (), worker.num_received_ex()), 1); } - + ACE_DEBUG ((LM_DEBUG, "(%P|%t)client: test passed.\n")); } catch (const CORBA::Exception& ex) @@ -212,7 +210,7 @@ Worker::svc (void) ACE_DEBUG ((LM_DEBUG, "(%P|%t) unexpected result = %d\n", r)); - + } catch (const CORBA::OBJECT_NOT_EXIST &) { @@ -257,25 +255,25 @@ Worker::svc (void) ex._tao_print_exception ( "Unexpected exception caught"); } - + return 0; } -int +int Worker::received_ex_kind () const { return received_ex_kind_; } -int +int Worker::num_received_ex () const { return num_received_ex_; } -void -Worker::done () +void +Worker::done () { done_ = true; } diff --git a/TAO/tests/ForwardOnceUponException/server.cpp b/TAO/tests/ForwardOnceUponException/server.cpp index 915615adbee..c80ecdd86f1 100755 --- a/TAO/tests/ForwardOnceUponException/server.cpp +++ b/TAO/tests/ForwardOnceUponException/server.cpp @@ -6,8 +6,6 @@ #include "ace/OS_NS_stdio.h" #include "tao/Invocation_Utils.h" -ACE_RCSID(ForwardOnceUponException, server, "$Id$") - const ACE_TCHAR *ior_output_file = ACE_TEXT("test.ior"); int expect_servant_calls = 1; int raise_exception = TAO::FOE_NON; @@ -112,7 +110,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) ACE_DEBUG ((LM_DEBUG, "(%P|%t)server: event loop finished\n")); - // If expect_servant_calls is 0, it means it's the request forward looping case so the + // If expect_servant_calls is 0, it means it's the request forward looping case so the // servant continue receiving calls from a single request. We can not determine how many // servant calls but it should be more than the number of requests. if ((expect_servant_calls == 0 && (server_impl.ncalls () > num_requests)) diff --git a/TAO/tests/ForwardOnceUponException/test_i.cpp b/TAO/tests/ForwardOnceUponException/test_i.cpp index e899da4f4b4..e139a027d6c 100755 --- a/TAO/tests/ForwardOnceUponException/test_i.cpp +++ b/TAO/tests/ForwardOnceUponException/test_i.cpp @@ -6,7 +6,6 @@ #include "test_i.inl" #endif /* __ACE_INLINE__ */ -ACE_RCSID(ForwardOnceUponException, test_i, "$Id$") extern int raise_exception; CORBA::Boolean @@ -19,19 +18,19 @@ Simple_Server_i::test_is_a (const char * /* type */) //ACE_DEBUG ((LM_DEBUG, "(%P|%t) test_is_a called %d and raise OBJECT_NOT_EXIST\n", ncalls_)); throw ::CORBA::OBJECT_NOT_EXIST (); } - + if ((raise_exception & TAO::FOE_COMM_FAILURE) == TAO::FOE_COMM_FAILURE) { //ACE_DEBUG ((LM_DEBUG, "(%P|%t) test_is_a called %d and raise COMM_FAILURE\n", ncalls_)); throw ::CORBA::COMM_FAILURE (); } - + if ((raise_exception & TAO::FOE_TRANSIENT) == TAO::FOE_TRANSIENT) { //ACE_DEBUG ((LM_DEBUG, "(%P|%t) test_is_a called %d and raise TRANSIENT\n", ncalls_)); throw ::CORBA::TRANSIENT (); } - + if ((raise_exception & TAO::FOE_INV_OBJREF) == TAO::FOE_INV_OBJREF) { //ACE_DEBUG ((LM_DEBUG, "(%P|%t) test_is_a called %d and raise INV_OBJREF\n", ncalls_)); |