summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/operations/ServerAMD.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/test/Ice/operations/ServerAMD.cpp')
-rw-r--r--cpp/test/Ice/operations/ServerAMD.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/cpp/test/Ice/operations/ServerAMD.cpp b/cpp/test/Ice/operations/ServerAMD.cpp
index 939bb4a0fe0..587fdc467c9 100644
--- a/cpp/test/Ice/operations/ServerAMD.cpp
+++ b/cpp/test/Ice/operations/ServerAMD.cpp
@@ -20,6 +20,17 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
Ice::ObjectPtr object = new MyDerivedClassI(adapter, Ice::stringToIdentity("test"));
adapter->add(object, Ice::stringToIdentity("test"));
adapter->activate();
+
+ //
+ // Make a separate adapter with a servant locator. We use this to test
+ // that ::Ice::Context is correctly passed to checkedCast() operation.
+ //
+ communicator->getProperties()->setProperty("CheckedCastAdapter.Endpoints", "default -p 12346 -t 10000");
+ adapter = communicator->createObjectAdapter("CheckedCastAdapter");
+ Ice::ServantLocatorPtr checkedCastLocator = new CheckedCastLocator();
+ adapter->addServantLocator(checkedCastLocator, "");
+ adapter->activate();
+
communicator->waitForShutdown();
return EXIT_SUCCESS;
}