diff options
Diffstat (limited to 'cpp/test/Ice/operations/Collocated.cpp')
-rw-r--r-- | cpp/test/Ice/operations/Collocated.cpp | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/cpp/test/Ice/operations/Collocated.cpp b/cpp/test/Ice/operations/Collocated.cpp index 13dbdcc0369..50d8dc7ac11 100644 --- a/cpp/test/Ice/operations/Collocated.cpp +++ b/cpp/test/Ice/operations/Collocated.cpp @@ -17,18 +17,9 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12345 -t 10000"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); - 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, ""); + Ice::Identity id = Ice::stringToIdentity("test"); + adapter->add(new MyDerivedClassI(adapter, id), id); + adapter->add(new TestCheckedCastI, Ice::stringToIdentity("context")); adapter->activate(); Test::MyClassPrx allTests(const Ice::CommunicatorPtr&, bool); |