diff options
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/test/Glacier/starter/CallbackI.cpp | 1 | ||||
-rw-r--r-- | cpp/test/Glacier/starter/Client.cpp | 13 |
2 files changed, 13 insertions, 1 deletions
diff --git a/cpp/test/Glacier/starter/CallbackI.cpp b/cpp/test/Glacier/starter/CallbackI.cpp index 2cf185d4cc8..e76e558c7dc 100644 --- a/cpp/test/Glacier/starter/CallbackI.cpp +++ b/cpp/test/Glacier/starter/CallbackI.cpp @@ -23,6 +23,7 @@ void CallbackReceiverI::callback(const Current&) { IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this); + assert(!_callback); _callback = true; notify(); } diff --git a/cpp/test/Glacier/starter/Client.cpp b/cpp/test/Glacier/starter/Client.cpp index ba07663780c..c7f02836891 100644 --- a/cpp/test/Glacier/starter/Client.cpp +++ b/cpp/test/Glacier/starter/Client.cpp @@ -98,7 +98,7 @@ CallbackClient::run(int argc, char* argv[]) adapter->createProxy(stringToIdentity("callbackReceiver"))); { - cout << "testing callback... " << flush; + cout << "testing twoway callback... " << flush; Context context; context["_fwd"] = "t"; twoway->initiateCallback(twowayR, context); @@ -106,6 +106,17 @@ CallbackClient::run(int argc, char* argv[]) cout << "ok" << endl; } + { + cout << "testing oneway callback... " << flush; + CallbackPrx oneway = CallbackPrx::uncheckedCast(twoway->ice_oneway()); + CallbackReceiverPrx onewayR = CallbackReceiverPrx::uncheckedCast(twowayR->ice_oneway()); + Context context; + context["_fwd"] = "t"; + oneway->initiateCallback(onewayR, context); + test(callbackReceiverImpl->callbackOK()); + cout << "ok" << endl; + } + cout << "testing server shutdown... " << flush; twoway->shutdown(); // No ping, otherwise the glacier router prints a warning |