summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/dispatcher/AllTests.cpp
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2014-07-10 17:17:55 -0230
committerMatthew Newhook <matthew@zeroc.com>2014-07-10 17:17:55 -0230
commit9326917abfa8ebd9815e192db2dd57cd8e85179d (patch)
tree26045ee4f12e9eab55cbeaefb6a3855ac16d6f50 /cpp/test/Ice/dispatcher/AllTests.cpp
parentPartial fix for ICE-5548: better C++11 detection (diff)
downloadice-9326917abfa8ebd9815e192db2dd57cd8e85179d.tar.bz2
ice-9326917abfa8ebd9815e192db2dd57cd8e85179d.tar.xz
ice-9326917abfa8ebd9815e192db2dd57cd8e85179d.zip
ICE-5573 - .NET TimeoutException ignores Dispatcher
- Added test for C++, C# & Java to the dispatcher test to ensure that the invocation timeout is throwin in the correct thread. - Pass the connection to the dispatcher invocation in more cases.
Diffstat (limited to 'cpp/test/Ice/dispatcher/AllTests.cpp')
-rw-r--r--cpp/test/Ice/dispatcher/AllTests.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/cpp/test/Ice/dispatcher/AllTests.cpp b/cpp/test/Ice/dispatcher/AllTests.cpp
index 7e82afcf37d..a4a7cc25c5c 100644
--- a/cpp/test/Ice/dispatcher/AllTests.cpp
+++ b/cpp/test/Ice/dispatcher/AllTests.cpp
@@ -52,6 +52,18 @@ public:
called();
}
+ void responseEx()
+ {
+ test(false);
+ }
+
+ void exceptionEx(const ::Ice::Exception& ex)
+ {
+ test(dynamic_cast<const Ice::InvocationTimeoutException*>(&ex));
+ test(Dispatcher::isDispatcherThread());
+ called();
+ }
+
void
payload()
{
@@ -123,6 +135,15 @@ allTests(const Ice::CommunicatorPtr& communicator)
i->begin_op(callback);
cb->check();
+ {
+ //
+ // Expect InvocationTimeoutException.
+ //
+ Test::TestIntfPrx to = p->ice_invocationTimeout(250);
+ to->begin_sleep(500, Test::newCallback_TestIntf_sleep(cb, &Callback::responseEx, &Callback::exceptionEx));
+ cb->check();
+ }
+
testController->holdAdapter();
Test::Callback_TestIntf_opWithPayloadPtr callback2 =