summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/dispatcher/AllTests.cpp
diff options
context:
space:
mode:
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 =