diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2020-12-09 12:36:56 +0100 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2020-12-09 12:36:56 +0100 |
commit | 064f3e2e5802e1a87b75eb7f10dee26d3445032e (patch) | |
tree | 3abd81df3279e04660edaa9b32a7f16ff7b64ccd /TAO/tests | |
parent | c84a7d460a4b48011af7fd044442991cb69f910b (diff) | |
download | ATCD-064f3e2e5802e1a87b75eb7f10dee26d3445032e.tar.gz |
Layout changes and test more PI operations explicitly
* TAO/tao/PI_Server/ServerRequestInfo.cpp:
* TAO/tests/Portable_Interceptors/Dynamic/server_interceptor.cpp:
Diffstat (limited to 'TAO/tests')
-rw-r--r-- | TAO/tests/Portable_Interceptors/Dynamic/server_interceptor.cpp | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/TAO/tests/Portable_Interceptors/Dynamic/server_interceptor.cpp b/TAO/tests/Portable_Interceptors/Dynamic/server_interceptor.cpp index 94732fb8af7..e791b4091d0 100644 --- a/TAO/tests/Portable_Interceptors/Dynamic/server_interceptor.cpp +++ b/TAO/tests/Portable_Interceptors/Dynamic/server_interceptor.cpp @@ -26,8 +26,43 @@ Echo_Server_Request_Interceptor::destroy () void Echo_Server_Request_Interceptor::receive_request_service_contexts ( - PortableInterceptor::ServerRequestInfo_ptr) + PortableInterceptor::ServerRequestInfo_ptr ri) { + bool catched_exception = false; + try + { + CORBA::String_var tmdi = ri->target_most_derived_interface (); + } + catch (const ::CORBA::BAD_INV_ORDER& ex) + { + // BAD_INV_ORDER should be thrown with minor code 14 + catched_exception = (ex.minor () == (CORBA::OMGVMCID | 14)); + } + + if (!catched_exception) + { + ++this->result_; + ACE_ERROR ((LM_ERROR, + "(%P|%t) ERROR, no exception when calling target_most_derived_interface from receive_request_service_contexts\n")); + } + + catched_exception = false; + try + { + CORBA::Boolean tmdi = ri->target_is_a ("FOO"); + } + catch (const ::CORBA::BAD_INV_ORDER& ex) + { + // BAD_INV_ORDER should be thrown with minor code 14 + catched_exception = (ex.minor () == (CORBA::OMGVMCID | 14)); + } + + if (!catched_exception) + { + ++this->result_; + ACE_ERROR ((LM_ERROR, + "(%P|%t) ERROR, no exception when calling target_is_a from receive_request_service_contexts\n")); + } } void |