diff options
author | Matthew Newhook <matthew@zeroc.com> | 2005-08-22 06:41:44 +0000 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2005-08-22 06:41:44 +0000 |
commit | 65fdd67689a858132d5417c768025b733490872d (patch) | |
tree | ea843d02636b1304fcdafff4b63b97e4d3d969d1 /cpp/test/Ice/operations/Server.cpp | |
parent | Simplify operations test. (diff) | |
download | ice-65fdd67689a858132d5417c768025b733490872d.tar.bz2 ice-65fdd67689a858132d5417c768025b733490872d.tar.xz ice-65fdd67689a858132d5417c768025b733490872d.zip |
Simplify the operations test.
Diffstat (limited to 'cpp/test/Ice/operations/Server.cpp')
-rw-r--r-- | cpp/test/Ice/operations/Server.cpp | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/cpp/test/Ice/operations/Server.cpp b/cpp/test/Ice/operations/Server.cpp index b60ca3c4f6b..c5e61af62cd 100644 --- a/cpp/test/Ice/operations/Server.cpp +++ b/cpp/test/Ice/operations/Server.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(); communicator->waitForShutdown(); |