diff options
Diffstat (limited to 'cpp/test/IceGrid')
21 files changed, 94 insertions, 94 deletions
diff --git a/cpp/test/IceGrid/activation/Server.cpp b/cpp/test/IceGrid/activation/Server.cpp index 54b2aa418c1..e614fdaf02b 100644 --- a/cpp/test/IceGrid/activation/Server.cpp +++ b/cpp/test/IceGrid/activation/Server.cpp @@ -36,7 +36,7 @@ Server::run(int argc, char* argv[]) Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("TestAdapter"); TestI* test = new TestI(); Ice::ObjectPtr obj = test; - adapter->add(test, communicator()->stringToIdentity(properties->getProperty("Ice.Admin.ServerId"))); + adapter->add(test, Ice::stringToIdentity(properties->getProperty("Ice.Admin.ServerId"))); int delay = properties->getPropertyAsInt("ActivationDelay"); if(delay > 0) diff --git a/cpp/test/IceGrid/allocation/AllTests.cpp b/cpp/test/IceGrid/allocation/AllTests.cpp index 12473e73d3b..0a86f1011f3 100644 --- a/cpp/test/IceGrid/allocation/AllTests.cpp +++ b/cpp/test/IceGrid/allocation/AllTests.cpp @@ -192,7 +192,7 @@ public: os << "stress-" << IceUtilInternal::random(6) + 1; try { - return session->allocateObjectById(_communicator->stringToIdentity(os.str())); + return session->allocateObjectById(Ice::stringToIdentity(os.str())); } catch(const AllocationTimeoutException&) { @@ -227,7 +227,7 @@ public: CallbackPtr asyncCB = new Callback(); IceGrid::Callback_Session_allocateObjectByIdPtr cb = IceGrid::newCallback_Session_allocateObjectById(asyncCB, &Callback::response, &Callback::exception); - session->begin_allocateObjectById(_communicator->stringToIdentity(os.str()), cb); + session->begin_allocateObjectById(Ice::stringToIdentity(os.str()), cb); session->destroy(); } @@ -307,19 +307,19 @@ allTests(const Ice::CommunicatorPtr& communicator) cout << "testing allocate object by identity... " << flush; - Ice::Identity allocatable = communicator->stringToIdentity("allocatable"); - Ice::Identity allocatablebis = communicator->stringToIdentity("allocatablebis"); + Ice::Identity allocatable = Ice::stringToIdentity("allocatable"); + Ice::Identity allocatablebis = Ice::stringToIdentity("allocatablebis"); try { - session1->allocateObjectById(communicator->stringToIdentity("dummy")); + session1->allocateObjectById(Ice::stringToIdentity("dummy")); } catch(const ObjectNotRegisteredException&) { } try { - session1->releaseObject(communicator->stringToIdentity("dummy")); + session1->releaseObject(Ice::stringToIdentity("dummy")); } catch(const ObjectNotRegisteredException&) { @@ -327,7 +327,7 @@ allTests(const Ice::CommunicatorPtr& communicator) try { - session1->allocateObjectById(communicator->stringToIdentity("nonallocatable")); + session1->allocateObjectById(Ice::stringToIdentity("nonallocatable")); test(false); } catch(const AllocationException&) @@ -340,7 +340,7 @@ allTests(const Ice::CommunicatorPtr& communicator) try { - session2->allocateObjectById(communicator->stringToIdentity("nonallocatable")); + session2->allocateObjectById(Ice::stringToIdentity("nonallocatable")); test(false); } catch(const AllocationException&) @@ -353,7 +353,7 @@ allTests(const Ice::CommunicatorPtr& communicator) try { - session1->releaseObject(communicator->stringToIdentity("nonallocatable")); + session1->releaseObject(Ice::stringToIdentity("nonallocatable")); test(false); } catch(const AllocationException&) @@ -366,7 +366,7 @@ allTests(const Ice::CommunicatorPtr& communicator) try { - session2->releaseObject(communicator->stringToIdentity("nonallocatable")); + session2->releaseObject(Ice::stringToIdentity("nonallocatable")); test(false); } catch(const AllocationException&) @@ -642,8 +642,8 @@ allTests(const Ice::CommunicatorPtr& communicator) session1->setAllocationTimeout(0); session2->setAllocationTimeout(0); - Ice::Identity allocatable3 = communicator->stringToIdentity("allocatable3"); - Ice::Identity allocatable4 = communicator->stringToIdentity("allocatable4"); + Ice::Identity allocatable3 = Ice::stringToIdentity("allocatable3"); + Ice::Identity allocatable4 = Ice::stringToIdentity("allocatable4"); session1->allocateObjectById(allocatable3); try @@ -777,8 +777,8 @@ allTests(const Ice::CommunicatorPtr& communicator) { } test(session1->allocateObjectByType("::TestMultipleByServer")); - session1->releaseObject(communicator->stringToIdentity("allocatable31")); - session1->releaseObject(communicator->stringToIdentity("allocatable41")); + session1->releaseObject(Ice::stringToIdentity("allocatable31")); + session1->releaseObject(Ice::stringToIdentity("allocatable41")); test(session2->allocateObjectByType("::TestMultipleByServer")); try { @@ -789,8 +789,8 @@ allTests(const Ice::CommunicatorPtr& communicator) { } test(session2->allocateObjectByType("::TestMultipleByServer")); - session2->releaseObject(communicator->stringToIdentity("allocatable31")); - session2->releaseObject(communicator->stringToIdentity("allocatable41")); + session2->releaseObject(Ice::stringToIdentity("allocatable31")); + session2->releaseObject(Ice::stringToIdentity("allocatable41")); Ice::ObjectPrx obj1 = session1->allocateObjectByType("::TestMultipleServer"); test(obj1); diff --git a/cpp/test/IceGrid/allocation/PermissionsVerifier.cpp b/cpp/test/IceGrid/allocation/PermissionsVerifier.cpp index d39a9eb1dce..54fe5be7c01 100644 --- a/cpp/test/IceGrid/allocation/PermissionsVerifier.cpp +++ b/cpp/test/IceGrid/allocation/PermissionsVerifier.cpp @@ -30,7 +30,7 @@ public: virtual int run(int, char*[]) { Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("PermissionsVerifier"); - adapter->add(new PermissionsVerifierI, communicator()->stringToIdentity("PermissionsVerifier")); + adapter->add(new PermissionsVerifierI, Ice::stringToIdentity("PermissionsVerifier")); adapter->activate(); communicator()->waitForShutdown(); return EXIT_SUCCESS; diff --git a/cpp/test/IceGrid/allocation/Server.cpp b/cpp/test/IceGrid/allocation/Server.cpp index 8e9931a3e91..113ccaa4846 100644 --- a/cpp/test/IceGrid/allocation/Server.cpp +++ b/cpp/test/IceGrid/allocation/Server.cpp @@ -32,16 +32,16 @@ Server::run(int argc, char* argv[]) string name = properties->getProperty("Ice.ProgramName"); Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("Server"); - adapter->add(new TestI(properties), communicator()->stringToIdentity("allocatable")); - adapter->add(new TestI(properties), communicator()->stringToIdentity("nonallocatable")); - adapter->add(new TestI(properties), communicator()->stringToIdentity("allocatable1")); - adapter->add(new TestI(properties), communicator()->stringToIdentity("allocatable2")); - adapter->add(new TestI(properties), communicator()->stringToIdentity("allocatable3")); - adapter->add(new TestI(properties), communicator()->stringToIdentity("allocatable4")); - adapter->add(new TestI(properties), communicator()->stringToIdentity("allocatable11")); - adapter->add(new TestI(properties), communicator()->stringToIdentity("allocatable21")); - adapter->add(new TestI(properties), communicator()->stringToIdentity("allocatable31")); - adapter->add(new TestI(properties), communicator()->stringToIdentity("allocatable41")); + adapter->add(new TestI(properties), Ice::stringToIdentity("allocatable")); + adapter->add(new TestI(properties), Ice::stringToIdentity("nonallocatable")); + adapter->add(new TestI(properties), Ice::stringToIdentity("allocatable1")); + adapter->add(new TestI(properties), Ice::stringToIdentity("allocatable2")); + adapter->add(new TestI(properties), Ice::stringToIdentity("allocatable3")); + adapter->add(new TestI(properties), Ice::stringToIdentity("allocatable4")); + adapter->add(new TestI(properties), Ice::stringToIdentity("allocatable11")); + adapter->add(new TestI(properties), Ice::stringToIdentity("allocatable21")); + adapter->add(new TestI(properties), Ice::stringToIdentity("allocatable31")); + adapter->add(new TestI(properties), Ice::stringToIdentity("allocatable41")); shutdownOnInterrupt(); try diff --git a/cpp/test/IceGrid/deployer/AllTests.cpp b/cpp/test/IceGrid/deployer/AllTests.cpp index 47d984c302c..301692a25aa 100644 --- a/cpp/test/IceGrid/deployer/AllTests.cpp +++ b/cpp/test/IceGrid/deployer/AllTests.cpp @@ -68,7 +68,7 @@ public: bool operator()(const Ice::ObjectPrx& p1, const string& id) const { - return p1->ice_getIdentity() == _communicator->stringToIdentity(id); + return p1->ice_getIdentity() == Ice::stringToIdentity(id); } private: @@ -429,16 +429,16 @@ allTests(const Ice::CommunicatorPtr& comm) test(find_if(objs.begin(), objs.end(), bind2nd(ProxyIdentityEqual(comm),"ReplicatedObject")) != objs.end()); { - test(comm->identityToString(query->findObjectByType("::TestId1")->ice_getIdentity()) == "cat/name1"); - test(comm->identityToString(query->findObjectByType("::TestId2")->ice_getIdentity()) == "cat1/name1"); - test(comm->identityToString(query->findObjectByType("::TestId3")->ice_getIdentity()) == "cat1/name1-bis"); - test(comm->identityToString(query->findObjectByType("::TestId4")->ice_getIdentity()) == "c2\\/c2/n2\\/n2"); - test(comm->identityToString(query->findObjectByType("::TestId5")->ice_getIdentity()) == "n2\\/n2"); + test(identityToString(query->findObjectByType("::TestId1")->ice_getIdentity()) == "cat/name1"); + test(identityToString(query->findObjectByType("::TestId2")->ice_getIdentity()) == "cat1/name1"); + test(identityToString(query->findObjectByType("::TestId3")->ice_getIdentity()) == "cat1/name1-bis"); + test(identityToString(query->findObjectByType("::TestId4")->ice_getIdentity()) == "c2\\/c2/n2\\/n2"); + test(identityToString(query->findObjectByType("::TestId5")->ice_getIdentity()) == "n2\\/n2"); } { Ice::ObjectPrx obj = query->findObjectByType("::Test"); - string id = comm->identityToString(obj->ice_getIdentity()); + string id = identityToString(obj->ice_getIdentity()); test(id == "Server1" || id == "Server2" || id == "SimpleServer" || id == "IceBox1-Service1" || id == "IceBox1-Service2" || id == "IceBox2-Service1" || id == "IceBox2-Service2" || @@ -447,7 +447,7 @@ allTests(const Ice::CommunicatorPtr& comm) { Ice::ObjectPrx obj = query->findObjectByTypeOnLeastLoadedNode("::Test", LoadSample5); - string id = comm->identityToString(obj->ice_getIdentity()); + string id = identityToString(obj->ice_getIdentity()); test(id == "Server1" || id == "Server2" || id == "SimpleServer" || id == "IceBox1-Service1" || id == "IceBox1-Service2" || id == "IceBox2-Service1" || id == "IceBox2-Service2" || diff --git a/cpp/test/IceGrid/deployer/Server.cpp b/cpp/test/IceGrid/deployer/Server.cpp index 42c9ebef1d2..5c5f6f821db 100644 --- a/cpp/test/IceGrid/deployer/Server.cpp +++ b/cpp/test/IceGrid/deployer/Server.cpp @@ -42,7 +42,7 @@ Server::run(int argc, char* argv[]) adapter = communicator()->createObjectAdapter("Server"); Ice::ObjectPtr object = new TestI(properties); - adapter->add(object, communicator()->stringToIdentity(name)); + adapter->add(object, Ice::stringToIdentity(name)); shutdownOnInterrupt(); try { diff --git a/cpp/test/IceGrid/deployer/Service.cpp b/cpp/test/IceGrid/deployer/Service.cpp index b9587ec1889..c5905ea722e 100644 --- a/cpp/test/IceGrid/deployer/Service.cpp +++ b/cpp/test/IceGrid/deployer/Service.cpp @@ -58,7 +58,7 @@ ServiceI::start(const string& name, Ice::PropertiesPtr properties = communicator->getProperties(); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter(name); Ice::ObjectPtr object = new TestI(properties); - adapter->add(object, communicator->stringToIdentity(properties->getProperty(name + ".Identity"))); + adapter->add(object, stringToIdentity(properties->getProperty(name + ".Identity"))); adapter->activate(); } diff --git a/cpp/test/IceGrid/distribution/Server.cpp b/cpp/test/IceGrid/distribution/Server.cpp index 2d7f88df87d..c86e876bbf9 100644 --- a/cpp/test/IceGrid/distribution/Server.cpp +++ b/cpp/test/IceGrid/distribution/Server.cpp @@ -33,7 +33,7 @@ Server::run(int argc, char* argv[]) Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("Server"); Ice::ObjectPtr object = new TestI(properties); - adapter->add(object, communicator()->stringToIdentity(name)); + adapter->add(object, Ice::stringToIdentity(name)); shutdownOnInterrupt(); try diff --git a/cpp/test/IceGrid/noRestartUpdate/AllTests.cpp b/cpp/test/IceGrid/noRestartUpdate/AllTests.cpp index 95f7ca1a58c..97a85507c05 100644 --- a/cpp/test/IceGrid/noRestartUpdate/AllTests.cpp +++ b/cpp/test/IceGrid/noRestartUpdate/AllTests.cpp @@ -193,7 +193,7 @@ allTests(const Ice::CommunicatorPtr& communicator) adapter.serverLifetime = true; addProperty(server, "Server.Endpoints", "default"); ObjectDescriptor object; - object.id = communicator->stringToIdentity("${server}"); + object.id = Ice::stringToIdentity("${server}"); object.type = "::Test::TestIntf"; adapter.objects.push_back(object); server->adapters.push_back(adapter); @@ -204,7 +204,7 @@ allTests(const Ice::CommunicatorPtr& communicator) update.nodes[0].servers[0]->id = "Server2"; update.nodes[0].servers[0]->adapters[0].id = "ServerAdapter2"; - update.nodes[0].servers[0]->adapters[0].objects[0].id = communicator->stringToIdentity("test2"); + update.nodes[0].servers[0]->adapters[0].objects[0].id = Ice::stringToIdentity("test2"); try { admin->updateApplicationWithoutRestart(update); @@ -240,7 +240,7 @@ allTests(const Ice::CommunicatorPtr& communicator) adapter.serverLifetime = true; addProperty(server, "Server.Endpoints", "default"); object = ObjectDescriptor(); - object.id = communicator->stringToIdentity("${server}"); + object.id = Ice::stringToIdentity("${server}"); object.type = "::Test::TestIntf"; adapter.objects.push_back(object); server->adapters.push_back(adapter); @@ -456,7 +456,7 @@ allTests(const Ice::CommunicatorPtr& communicator) test(info.descriptor); test(info.descriptor->adapters.size() == 1); object = ObjectDescriptor(); - object.id = communicator->stringToIdentity("testfoo"); + object.id = Ice::stringToIdentity("testfoo"); info.descriptor->adapters[0].objects.push_back(object); update = empty; update.nodes[0].servers.push_back(info.descriptor); @@ -478,7 +478,7 @@ allTests(const Ice::CommunicatorPtr& communicator) info = admin->getServerInfo("Server"); test(info.descriptor); object = ObjectDescriptor(); - object.id = communicator->stringToIdentity("test"); + object.id = Ice::stringToIdentity("test"); info.descriptor->adapters[0].allocatables.push_back(object); update = empty; update.nodes[0].servers.push_back(info.descriptor); @@ -536,7 +536,7 @@ allTests(const Ice::CommunicatorPtr& communicator) adapter.registerProcess = false; adapter.serverLifetime = false; addProperty(service, "${service}.Endpoints", "default"); - object.id = communicator->stringToIdentity("${server}.${service}"); + object.id = Ice::stringToIdentity("${server}.${service}"); addProperty(service, "${service}.Identity", "${server}.${service}"); adapter.objects.push_back(object); service->adapters.push_back(adapter); diff --git a/cpp/test/IceGrid/noRestartUpdate/Server.cpp b/cpp/test/IceGrid/noRestartUpdate/Server.cpp index 492fe695d1c..ad1d3fa2ae9 100644 --- a/cpp/test/IceGrid/noRestartUpdate/Server.cpp +++ b/cpp/test/IceGrid/noRestartUpdate/Server.cpp @@ -33,7 +33,7 @@ Server::run(int argc, char* argv[]) Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("Server"); Ice::ObjectPtr object = new TestI(adapter, properties); - adapter->add(object, communicator()->stringToIdentity(name)); + adapter->add(object, Ice::stringToIdentity(name)); shutdownOnInterrupt(); try diff --git a/cpp/test/IceGrid/noRestartUpdate/Service.cpp b/cpp/test/IceGrid/noRestartUpdate/Service.cpp index b0f86c594e8..a07b62b74db 100644 --- a/cpp/test/IceGrid/noRestartUpdate/Service.cpp +++ b/cpp/test/IceGrid/noRestartUpdate/Service.cpp @@ -58,7 +58,7 @@ ServiceI::start(const string& name, Ice::PropertiesPtr properties = communicator->getProperties(); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter(name); Ice::ObjectPtr object = new TestI(adapter, properties); - adapter->add(object, communicator->stringToIdentity(properties->getProperty(name + ".Identity"))); + adapter->add(object, stringToIdentity(properties->getProperty(name + ".Identity"))); adapter->activate(); } diff --git a/cpp/test/IceGrid/replicaGroup/Server.cpp b/cpp/test/IceGrid/replicaGroup/Server.cpp index bc3dcfa1a14..938c6ea3d11 100644 --- a/cpp/test/IceGrid/replicaGroup/Server.cpp +++ b/cpp/test/IceGrid/replicaGroup/Server.cpp @@ -26,8 +26,8 @@ Server::run(int, char**) Ice::ObjectAdapterPtr adpt = communicator()->createObjectAdapter("ReplicatedAdapter"); Ice::PropertiesPtr properties = communicator()->getProperties(); Ice::ObjectPtr object = new TestI(properties); - adpt->add(object, communicator()->stringToIdentity(properties->getProperty("Ice.ProgramName"))); - adpt->add(object, communicator()->stringToIdentity(properties->getProperty("Identity"))); + adpt->add(object, Ice::stringToIdentity(properties->getProperty("Ice.ProgramName"))); + adpt->add(object, Ice::stringToIdentity(properties->getProperty("Identity"))); shutdownOnInterrupt(); try { diff --git a/cpp/test/IceGrid/replicaGroup/Service.cpp b/cpp/test/IceGrid/replicaGroup/Service.cpp index 7cf76382e6a..b87ab36faeb 100644 --- a/cpp/test/IceGrid/replicaGroup/Service.cpp +++ b/cpp/test/IceGrid/replicaGroup/Service.cpp @@ -57,8 +57,8 @@ ServiceI::start(const string& name, { Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter(name); Ice::ObjectPtr object = new TestI(communicator->getProperties()); - adapter->add(object, communicator->stringToIdentity(name)); - adapter->add(object, communicator->stringToIdentity(communicator->getProperties()->getProperty("Identity"))); + adapter->add(object, stringToIdentity(name)); + adapter->add(object, stringToIdentity(communicator->getProperties()->getProperty("Identity"))); adapter->activate(); } diff --git a/cpp/test/IceGrid/replication/AllTests.cpp b/cpp/test/IceGrid/replication/AllTests.cpp index 09c197e612e..05a64cf0b27 100644 --- a/cpp/test/IceGrid/replication/AllTests.cpp +++ b/cpp/test/IceGrid/replication/AllTests.cpp @@ -314,17 +314,17 @@ allTests(const Ice::CommunicatorPtr& comm) Ice::EndpointSeq endpoints; ObjectInfo info; - info = masterAdmin->getObjectInfo(comm->stringToIdentity("RepTestIceGrid/Locator")); - ObjectInfo info1 = slave1Admin->getObjectInfo(comm->stringToIdentity("RepTestIceGrid/Locator")); - test(slave1Admin->getObjectInfo(comm->stringToIdentity("RepTestIceGrid/Locator")) == info); + info = masterAdmin->getObjectInfo(Ice::stringToIdentity("RepTestIceGrid/Locator")); + ObjectInfo info1 = slave1Admin->getObjectInfo(Ice::stringToIdentity("RepTestIceGrid/Locator")); + test(slave1Admin->getObjectInfo(Ice::stringToIdentity("RepTestIceGrid/Locator")) == info); test(info.type == Ice::Locator::ice_staticId()); endpoints = info.proxy->ice_getEndpoints(); test(endpoints.size() == 2); test(endpoints[0]->toString().find("-p 12050") != string::npos); test(endpoints[1]->toString().find("-p 12051") != string::npos); - info = masterAdmin->getObjectInfo(comm->stringToIdentity("RepTestIceGrid/Query")); - test(slave1Admin->getObjectInfo(comm->stringToIdentity("RepTestIceGrid/Query")) == info); + info = masterAdmin->getObjectInfo(Ice::stringToIdentity("RepTestIceGrid/Query")); + test(slave1Admin->getObjectInfo(Ice::stringToIdentity("RepTestIceGrid/Query")) == info); test(info.type == IceGrid::Query::ice_staticId()); endpoints = info.proxy->ice_getEndpoints(); test(endpoints.size() == 2); @@ -334,15 +334,15 @@ allTests(const Ice::CommunicatorPtr& comm) admin->startServer("Slave2"); slave2Admin = createAdminSession(slave2Locator, "Slave2"); - info = masterAdmin->getObjectInfo(comm->stringToIdentity("RepTestIceGrid/Locator")); + info = masterAdmin->getObjectInfo(Ice::stringToIdentity("RepTestIceGrid/Locator")); // We eventually need to wait here for the update of the replicated objects to propagate to the replica. int nRetry = 0; - while(slave1Admin->getObjectInfo(comm->stringToIdentity("RepTestIceGrid/Locator")) != info && nRetry < maxRetry) + while(slave1Admin->getObjectInfo(Ice::stringToIdentity("RepTestIceGrid/Locator")) != info && nRetry < maxRetry) { IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(sleepTime)); ++nRetry; } - test(slave2Admin->getObjectInfo(comm->stringToIdentity("RepTestIceGrid/Locator")) == info); + test(slave2Admin->getObjectInfo(Ice::stringToIdentity("RepTestIceGrid/Locator")) == info); test(info.type == Ice::Locator::ice_staticId()); endpoints = info.proxy->ice_getEndpoints(); test(endpoints.size() == 3); @@ -350,15 +350,15 @@ allTests(const Ice::CommunicatorPtr& comm) test(endpoints[1]->toString().find("-p 12051") != string::npos); test(endpoints[2]->toString().find("-p 12052") != string::npos); - info = masterAdmin->getObjectInfo(comm->stringToIdentity("RepTestIceGrid/Query")); + info = masterAdmin->getObjectInfo(Ice::stringToIdentity("RepTestIceGrid/Query")); // We eventually need to wait here for the update of the replicated objects to propagate to the replica. nRetry = 0; - while(slave1Admin->getObjectInfo(comm->stringToIdentity("RepTestIceGrid/Query")) != info && nRetry < maxRetry) + while(slave1Admin->getObjectInfo(Ice::stringToIdentity("RepTestIceGrid/Query")) != info && nRetry < maxRetry) { IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(sleepTime)); ++nRetry; } - test(slave2Admin->getObjectInfo(comm->stringToIdentity("RepTestIceGrid/Query")) == info); + test(slave2Admin->getObjectInfo(Ice::stringToIdentity("RepTestIceGrid/Query")) == info); test(info.type == IceGrid::Query::ice_staticId()); endpoints = info.proxy->ice_getEndpoints(); test(endpoints.size() == 3); @@ -369,29 +369,29 @@ allTests(const Ice::CommunicatorPtr& comm) slave2Admin->shutdown(); waitForServerState(admin, "Slave2", false); - info = masterAdmin->getObjectInfo(comm->stringToIdentity("RepTestIceGrid/Locator")); + info = masterAdmin->getObjectInfo(Ice::stringToIdentity("RepTestIceGrid/Locator")); // We eventually need to wait here for the update of the replicated objects to propagate to the replica. nRetry = 0; - while(slave1Admin->getObjectInfo(comm->stringToIdentity("RepTestIceGrid/Locator")) != info && nRetry < maxRetry) + while(slave1Admin->getObjectInfo(Ice::stringToIdentity("RepTestIceGrid/Locator")) != info && nRetry < maxRetry) { IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(sleepTime)); ++nRetry; } - test(slave1Admin->getObjectInfo(comm->stringToIdentity("RepTestIceGrid/Locator")) == info); + test(slave1Admin->getObjectInfo(Ice::stringToIdentity("RepTestIceGrid/Locator")) == info); test(info.type == Ice::Locator::ice_staticId()); endpoints = info.proxy->ice_getEndpoints(); test(endpoints.size() == 2); test(endpoints[0]->toString().find("-p 12050") != string::npos); test(endpoints[1]->toString().find("-p 12051") != string::npos); - info = masterAdmin->getObjectInfo(comm->stringToIdentity("RepTestIceGrid/Query")); + info = masterAdmin->getObjectInfo(Ice::stringToIdentity("RepTestIceGrid/Query")); nRetry = 0; - while(slave1Admin->getObjectInfo(comm->stringToIdentity("RepTestIceGrid/Query")) != info && nRetry < maxRetry) + while(slave1Admin->getObjectInfo(Ice::stringToIdentity("RepTestIceGrid/Query")) != info && nRetry < maxRetry) { IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(sleepTime)); ++nRetry; } - test(slave1Admin->getObjectInfo(comm->stringToIdentity("RepTestIceGrid/Query")) == info); + test(slave1Admin->getObjectInfo(Ice::stringToIdentity("RepTestIceGrid/Query")) == info); test(info.type == IceGrid::Query::ice_staticId()); endpoints = info.proxy->ice_getEndpoints(); test(endpoints.size() == 2); @@ -948,7 +948,7 @@ allTests(const Ice::CommunicatorPtr& comm) property.value = "test"; server->propertySet.properties.push_back(property); ObjectDescriptor object; - object.id = comm->stringToIdentity("test"); + object.id = Ice::stringToIdentity("test"); object.type = "::Test::TestIntf"; adapter.objects.push_back(object); server->adapters.push_back(adapter); @@ -1175,7 +1175,7 @@ allTests(const Ice::CommunicatorPtr& comm) property.value = "test"; server->propertySet.properties.push_back(property); ObjectDescriptor object; - object.id = comm->stringToIdentity("test"); + object.id = Ice::stringToIdentity("test"); object.type = "::Test::TestIntf"; adapter.objects.push_back(object); server->adapters.push_back(adapter); @@ -1315,7 +1315,7 @@ allTests(const Ice::CommunicatorPtr& comm) property.value = "test"; server->propertySet.properties.push_back(property); ObjectDescriptor object; - object.id = comm->stringToIdentity("test"); + object.id = Ice::stringToIdentity("test"); object.type = "::Test::TestIntf"; adapter.objects.push_back(object); server->adapters.push_back(adapter); diff --git a/cpp/test/IceGrid/replication/Server.cpp b/cpp/test/IceGrid/replication/Server.cpp index 52126ea2c26..d4ade3c1c73 100644 --- a/cpp/test/IceGrid/replication/Server.cpp +++ b/cpp/test/IceGrid/replication/Server.cpp @@ -25,7 +25,7 @@ Server::run(int, char**) { Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("TestAdapter"); Ice::ObjectPtr object = new TestI(); - adapter->add(object, communicator()->stringToIdentity(communicator()->getProperties()->getProperty("Identity"))); + adapter->add(object, Ice::stringToIdentity(communicator()->getProperties()->getProperty("Identity"))); shutdownOnInterrupt(); try { diff --git a/cpp/test/IceGrid/session/AllTests.cpp b/cpp/test/IceGrid/session/AllTests.cpp index bdd080a9ea0..e7f18c31519 100644 --- a/cpp/test/IceGrid/session/AllTests.cpp +++ b/cpp/test/IceGrid/session/AllTests.cpp @@ -269,7 +269,7 @@ public: Lock sync(*this); this->objects.erase(id); updated(updateSerial(0, "object removed `" + - current.adapter->getCommunicator()->identityToString(id) + "'")); + identityToString(id) + "'")); } int serial; @@ -1641,20 +1641,20 @@ allTests(const Ice::CommunicatorPtr& communicator) admin->addObjectWithType(obj, "::Dummy"); objectObs1->waitForUpdate(__FILE__, __LINE__); - test(objectObs1->objects.find(communicator->stringToIdentity("dummy")) != objectObs1->objects.end()); - test(objectObs1->objects[communicator->stringToIdentity("dummy")].type == "::Dummy"); - test(objectObs1->objects[communicator->stringToIdentity("dummy")].proxy == obj); + test(objectObs1->objects.find(Ice::stringToIdentity("dummy")) != objectObs1->objects.end()); + test(objectObs1->objects[Ice::stringToIdentity("dummy")].type == "::Dummy"); + test(objectObs1->objects[Ice::stringToIdentity("dummy")].proxy == obj); obj = communicator->stringToProxy("dummy:tcp -p 10000 -h localhost"); admin->updateObject(obj); objectObs1->waitForUpdate(__FILE__, __LINE__); - test(objectObs1->objects.find(communicator->stringToIdentity("dummy")) != objectObs1->objects.end()); - test(objectObs1->objects[communicator->stringToIdentity("dummy")].type == "::Dummy"); - test(objectObs1->objects[communicator->stringToIdentity("dummy")].proxy == obj); + test(objectObs1->objects.find(Ice::stringToIdentity("dummy")) != objectObs1->objects.end()); + test(objectObs1->objects[Ice::stringToIdentity("dummy")].type == "::Dummy"); + test(objectObs1->objects[Ice::stringToIdentity("dummy")].proxy == obj); admin->removeObject(obj->ice_getIdentity()); objectObs1->waitForUpdate(__FILE__, __LINE__); - test(objectObs1->objects.find(communicator->stringToIdentity("dummy")) == objectObs1->objects.end()); + test(objectObs1->objects.find(Ice::stringToIdentity("dummy")) == objectObs1->objects.end()); } catch(const Ice::UserException& ex) { diff --git a/cpp/test/IceGrid/session/PermissionsVerifier.cpp b/cpp/test/IceGrid/session/PermissionsVerifier.cpp index f2971f5309d..ec8444d7f00 100644 --- a/cpp/test/IceGrid/session/PermissionsVerifier.cpp +++ b/cpp/test/IceGrid/session/PermissionsVerifier.cpp @@ -43,7 +43,7 @@ public: { Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapterWithEndpoints( "PermissionsVerifier", "tcp -p 12002"); - adapter->add(new AdminPermissionsVerifierI, communicator()->stringToIdentity("AdminPermissionsVerifier")); + adapter->add(new AdminPermissionsVerifierI, Ice::stringToIdentity("AdminPermissionsVerifier")); adapter->activate(); communicator()->waitForShutdown(); return EXIT_SUCCESS; diff --git a/cpp/test/IceGrid/session/Server.cpp b/cpp/test/IceGrid/session/Server.cpp index 86abe1afd38..e118744af53 100644 --- a/cpp/test/IceGrid/session/Server.cpp +++ b/cpp/test/IceGrid/session/Server.cpp @@ -66,8 +66,8 @@ Server::run(int, char**) Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("Server"); if(communicator()->getProperties()->getPropertyAsInt("AddPermissionsVerifiers") > 0) { - adapter->add(new ClientPermissionsVerifierI(), communicator()->stringToIdentity("ClientPermissionsVerifier")); - adapter->add(new SSLPermissionsVerifierI(), communicator()->stringToIdentity("SSLPermissionsVerifier")); + adapter->add(new ClientPermissionsVerifierI(), Ice::stringToIdentity("ClientPermissionsVerifier")); + adapter->add(new SSLPermissionsVerifierI(), Ice::stringToIdentity("SSLPermissionsVerifier")); } adapter->activate(); diff --git a/cpp/test/IceGrid/simple/Server.cpp b/cpp/test/IceGrid/simple/Server.cpp index 5bc7aa01d69..1ba08e9b8af 100644 --- a/cpp/test/IceGrid/simple/Server.cpp +++ b/cpp/test/IceGrid/simple/Server.cpp @@ -30,7 +30,7 @@ Server::run(int argc, char* argv[]) Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("TestAdapter"); Ice::ObjectPtr object = new TestI(); string id = communicator()->getProperties()->getPropertyWithDefault("Identity", "test"); - adapter->add(object, communicator()->stringToIdentity(id)); + adapter->add(object, Ice::stringToIdentity(id)); shutdownOnInterrupt(); try diff --git a/cpp/test/IceGrid/update/AllTests.cpp b/cpp/test/IceGrid/update/AllTests.cpp index 9512d42b4c3..67653d1252c 100644 --- a/cpp/test/IceGrid/update/AllTests.cpp +++ b/cpp/test/IceGrid/update/AllTests.cpp @@ -106,7 +106,7 @@ allTests(const Ice::CommunicatorPtr& communicator) adapter.serverLifetime = false; addProperty(server, "Server.Endpoints", "default"); ObjectDescriptor object; - object.id = communicator->stringToIdentity("test"); + object.id = Ice::stringToIdentity("test"); object.type = "::Test::TestIntf"; adapter.objects.push_back(object); server->adapters.push_back(adapter); @@ -145,7 +145,7 @@ allTests(const Ice::CommunicatorPtr& communicator) test(false); } - update.nodes[0].servers[0]->adapters[0].objects[0].id = communicator->stringToIdentity("test2"); + update.nodes[0].servers[0]->adapters[0].objects[0].id = Ice::stringToIdentity("test2"); try { admin->updateApplication(update); @@ -173,7 +173,7 @@ allTests(const Ice::CommunicatorPtr& communicator) adapter.serverLifetime = false; addProperty(server, "Server.Endpoints", "default"); object = ObjectDescriptor(); - object.id = communicator->stringToIdentity("${server}"); + object.id = Ice::stringToIdentity("${server}"); object.type = "::Test::TestIntf"; adapter.objects.push_back(object); server->adapters.push_back(adapter); @@ -400,7 +400,7 @@ allTests(const Ice::CommunicatorPtr& communicator) adapter.serverLifetime = false; adapter.registerProcess = false; object = ObjectDescriptor(); - object.id = communicator->stringToIdentity("test"); + object.id = Ice::stringToIdentity("test"); adapter.objects.push_back(object); info.descriptor->adapters.push_back(adapter); update = empty; @@ -423,7 +423,7 @@ allTests(const Ice::CommunicatorPtr& communicator) info = admin->getServerInfo("Server"); test(info.descriptor); object = ObjectDescriptor(); - object.id = communicator->stringToIdentity("test"); + object.id = Ice::stringToIdentity("test"); info.descriptor->adapters[0].objects.push_back(object); update = empty; update.nodes[0].servers.push_back(info.descriptor); @@ -445,7 +445,7 @@ allTests(const Ice::CommunicatorPtr& communicator) info = admin->getServerInfo("Server"); test(info.descriptor); object = ObjectDescriptor(); - object.id = communicator->stringToIdentity("test1"); + object.id = Ice::stringToIdentity("test1"); info.descriptor->adapters[0].allocatables.push_back(object); update = empty; update.nodes[0].servers.push_back(info.descriptor); @@ -463,7 +463,7 @@ allTests(const Ice::CommunicatorPtr& communicator) info = admin->getServerInfo("Server"); test(info.descriptor); object = ObjectDescriptor(); - object.id = communicator->stringToIdentity("test1"); + object.id = Ice::stringToIdentity("test1"); info.descriptor->adapters[0].allocatables.push_back(object); update = empty; update.nodes[0].servers.push_back(info.descriptor); @@ -485,7 +485,7 @@ allTests(const Ice::CommunicatorPtr& communicator) info = admin->getServerInfo("Server"); test(info.descriptor); object = ObjectDescriptor(); - object.id = communicator->stringToIdentity("test"); + object.id = Ice::stringToIdentity("test"); info.descriptor->adapters[0].allocatables.push_back(object); update = empty; update.nodes[0].servers.push_back(info.descriptor); @@ -503,7 +503,7 @@ allTests(const Ice::CommunicatorPtr& communicator) info = admin->getServerInfo("Server"); test(info.descriptor); object = ObjectDescriptor(); - object.id = communicator->stringToIdentity("test"); + object.id = Ice::stringToIdentity("test"); info.descriptor->adapters[0].allocatables.push_back(object); update = empty; update.nodes[0].servers.push_back(info.descriptor); diff --git a/cpp/test/IceGrid/update/Server.cpp b/cpp/test/IceGrid/update/Server.cpp index 2d7f88df87d..c86e876bbf9 100644 --- a/cpp/test/IceGrid/update/Server.cpp +++ b/cpp/test/IceGrid/update/Server.cpp @@ -33,7 +33,7 @@ Server::run(int argc, char* argv[]) Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("Server"); Ice::ObjectPtr object = new TestI(properties); - adapter->add(object, communicator()->stringToIdentity(name)); + adapter->add(object, Ice::stringToIdentity(name)); shutdownOnInterrupt(); try |