diff options
author | Benoit Foucher <benoit@zeroc.com> | 2006-10-11 07:50:31 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2006-10-11 07:50:31 +0000 |
commit | 8e9b12de541e2a641c7e450df16e5a78bef20ec1 (patch) | |
tree | 66236a42905eec0c913479ba406f6688fd879e05 | |
parent | file policy.3.1.iceboxcs was initially added on branch R3_1_branch. (diff) | |
download | ice-8e9b12de541e2a641c7e450df16e5a78bef20ec1.tar.bz2 ice-8e9b12de541e2a641c7e450df16e5a78bef20ec1.tar.xz ice-8e9b12de541e2a641c7e450df16e5a78bef20ec1.zip |
Bug fixes, replication test.
35 files changed, 1319 insertions, 377 deletions
diff --git a/cpp/allTests.py b/cpp/allTests.py index 85717c5ef84..8643661917c 100755 --- a/cpp/allTests.py +++ b/cpp/allTests.py @@ -113,7 +113,8 @@ tests = [ \ "IceGrid/session", \ "IceGrid/update", \ "IceGrid/activation", \ - "IceGrid/replication", \ + "IceGrid/replicaGroup", \ +# "IceGrid/replication", \ "IceGrid/allocation", \ "Glacier2/router", \ "Glacier2/attack", \ diff --git a/cpp/config/IceGridAdmin.py b/cpp/config/IceGridAdmin.py index b00df728242..a946fcc081d 100644 --- a/cpp/config/IceGridAdmin.py +++ b/cpp/config/IceGridAdmin.py @@ -48,6 +48,7 @@ registryOptions = r' --Ice.Warn.Connections=0' + \ r' --IceGrid.Registry.Trace.Session=0' + \ r' --IceGrid.Registry.Trace.Application=0' + \ r' --IceGrid.Registry.Trace.Node=0' + \ + r' --IceGrid.Registry.Trace.Replica=0' + \ r' --IceGrid.Registry.Trace.Adapter=0' + \ r' --IceGrid.Registry.Trace.Object=0' + \ r' --IceGrid.Registry.Trace.Server=0' + \ diff --git a/cpp/src/IceGrid/AdminI.cpp b/cpp/src/IceGrid/AdminI.cpp index 43e6de3cd2a..7e3934a88d6 100644 --- a/cpp/src/IceGrid/AdminI.cpp +++ b/cpp/src/IceGrid/AdminI.cpp @@ -800,7 +800,6 @@ AdminI::getNodeHostname(const string& name, const Current&) const throw NodeUnreachableException(name, os.str()); return ""; // Keep the compiler happy. } - return ""; // Keep the compiler happy. } diff --git a/cpp/src/IceGrid/Database.cpp b/cpp/src/IceGrid/Database.cpp index 683bf379d52..82d16f884b3 100644 --- a/cpp/src/IceGrid/Database.cpp +++ b/cpp/src/IceGrid/Database.cpp @@ -338,7 +338,7 @@ Database::syncAdapters(const AdapterInfoSeq& adapters) Freeze::TransactionHolder txHolder(_connection); _adapters.clear(); - for(AdapterInfoSeq::const_iterator r = adapters.end(); r != adapters.end(); ++r) + for(AdapterInfoSeq::const_iterator r = adapters.begin(); r != adapters.end(); ++r) { _adapters.put(StringAdapterInfoDict::value_type(r->id, *r)); } @@ -1243,7 +1243,7 @@ Database::updateObject(const Ice::ObjectPrx& proxy) } } -void +int Database::addOrUpdateObjectsInDatabase(const ObjectInfoSeq& objects) { int serial; @@ -1261,6 +1261,7 @@ Database::addOrUpdateObjectsInDatabase(const ObjectInfoSeq& objects) } _objectObserverTopic->objectsAddedOrUpdated(serial, objects); + return serial; } void diff --git a/cpp/src/IceGrid/Database.h b/cpp/src/IceGrid/Database.h index 9c027cab800..5e23eea25bf 100644 --- a/cpp/src/IceGrid/Database.h +++ b/cpp/src/IceGrid/Database.h @@ -115,7 +115,7 @@ public: void removeObject(const Ice::Identity&); void updateObject(const Ice::ObjectPrx&); - void addOrUpdateObjectsInDatabase(const ObjectInfoSeq&); + int addOrUpdateObjectsInDatabase(const ObjectInfoSeq&); void removeObjectsInDatabase(const ObjectInfoSeq&); void allocateObject(const Ice::Identity&, const ObjectAllocationRequestPtr&); diff --git a/cpp/src/IceGrid/DescriptorParser.cpp b/cpp/src/IceGrid/DescriptorParser.cpp index acdc992d2ab..ea7d672fe32 100644 --- a/cpp/src/IceGrid/DescriptorParser.cpp +++ b/cpp/src/IceGrid/DescriptorParser.cpp @@ -206,7 +206,7 @@ DescriptorHandler::startElement(const string& name, const IceXML::Attributes& at { if(!_currentApplication.get()) { - error("the <server> element can only be a child of an <application> element"); + error("the <node> element can only be a child of an <application> element"); } _currentNode.reset(_currentApplication->createNode(attributes)); } @@ -252,7 +252,7 @@ DescriptorHandler::startElement(const string& name, const IceXML::Attributes& at } else if(name == "server-template") { - if(_currentTemplate.get() || _currentNode.get()) + if(!_currentApplication.get() || _currentTemplate.get() || _currentNode.get()) { error("the <server-template> element can only be a child of an <application> element"); } @@ -285,7 +285,7 @@ DescriptorHandler::startElement(const string& name, const IceXML::Attributes& at } else if(name == "service-template") { - if(_currentNode.get() || _currentTemplate.get()) + if(!_currentApplication.get() || _currentNode.get() || _currentTemplate.get()) { error("the <service-template> element can only be a child of an <application> element"); } diff --git a/cpp/src/IceGrid/RegistryI.cpp b/cpp/src/IceGrid/RegistryI.cpp index 6bfd2bad9c6..f4790311f6b 100644 --- a/cpp/src/IceGrid/RegistryI.cpp +++ b/cpp/src/IceGrid/RegistryI.cpp @@ -671,7 +671,10 @@ RegistryI::createSession(const string& user, const string& password, const Curre SessionIPtr session = _clientSessionFactory->createSessionServant(user, 0); session->setServantLocator(_sessionServantLocator); SessionPrx proxy = SessionPrx::uncheckedCast(_sessionServantLocator->add(session, current.con)); - _reaper->add(new SessionReapable(current.adapter, session, proxy->ice_getIdentity()), _sessionTimeout); + if(_sessionTimeout > 0) + { + _reaper->add(new SessionReapable(current.adapter, session, proxy->ice_getIdentity()), _sessionTimeout); + } return proxy; } @@ -724,7 +727,10 @@ RegistryI::createAdminSession(const string& user, const string& password, const session->setAdmin(AdminPrx::uncheckedCast(admin)); session->setServantLocator(_sessionServantLocator); AdminSessionPrx proxy = AdminSessionPrx::uncheckedCast(_sessionServantLocator->add(session, current.con)); - _reaper->add(new SessionReapable(current.adapter, session, proxy->ice_getIdentity()), _sessionTimeout); + if(_sessionTimeout > 0) + { + _reaper->add(new SessionReapable(current.adapter, session, proxy->ice_getIdentity()), _sessionTimeout); + } return proxy; } @@ -784,7 +790,10 @@ RegistryI::createSessionFromSecureConnection(const Current& current) SessionIPtr session = _clientSessionFactory->createSessionServant(userDN, 0); session->setServantLocator(_sessionServantLocator); SessionPrx proxy = SessionPrx::uncheckedCast(_sessionServantLocator->add(session, current.con)); - _reaper->add(new SessionReapable(current.adapter, session, proxy->ice_getIdentity()), _sessionTimeout); + if(_sessionTimeout > 0) + { + _reaper->add(new SessionReapable(current.adapter, session, proxy->ice_getIdentity()), _sessionTimeout); + } return proxy; } @@ -835,7 +844,10 @@ RegistryI::createAdminSessionFromSecureConnection(const Current& current) session->setAdmin(AdminPrx::uncheckedCast(admin)); session->setServantLocator(_sessionServantLocator); AdminSessionPrx proxy = AdminSessionPrx::uncheckedCast(_sessionServantLocator->add(session, current.con)); - _reaper->add(new SessionReapable(current.adapter, session, proxy->ice_getIdentity()), _sessionTimeout); + if(_sessionTimeout > 0) + { + _reaper->add(new SessionReapable(current.adapter, session, proxy->ice_getIdentity()), _sessionTimeout); + } return proxy; } diff --git a/cpp/src/IceGrid/ReplicaSessionI.cpp b/cpp/src/IceGrid/ReplicaSessionI.cpp index 26da8a7138d..dc432499f85 100644 --- a/cpp/src/IceGrid/ReplicaSessionI.cpp +++ b/cpp/src/IceGrid/ReplicaSessionI.cpp @@ -100,13 +100,17 @@ ReplicaSessionI::setEndpoints(const StringObjectProxyDict& endpoints, const Ice: void ReplicaSessionI::registerWellKnownObjects(const ObjectInfoSeq& objects, const Ice::Current& current) { - Lock sync(*this); - if(_destroy) + int serial; { - throw Ice::ObjectNotExistException(__FILE__, __LINE__); + Lock sync(*this); + if(_destroy) + { + throw Ice::ObjectNotExistException(__FILE__, __LINE__); + } + _replicaWellKnownObjects = objects; + serial = _database->addOrUpdateObjectsInDatabase(objects); } - _replicaWellKnownObjects = objects; - _database->addOrUpdateObjectsInDatabase(objects); + _database->getObserverTopic(ObjectObserverTopicName)->waitForSyncedSubscribers(serial, _name); } void @@ -156,13 +160,15 @@ ReplicaSessionI::destroy(const Ice::Current& current) } } - _database->removeReplica(_name, this, shutdown); - if(!shutdown) { + cerr << "updating well known objects " << _name << endl; _wellKnownObjects->updateReplicatedWellKnownObjects(); // No need to update these if we're shutting down. } + cerr << "removing replica " << _name << endl; + _database->removeReplica(_name, this, shutdown); + if(current.adapter) { try @@ -190,6 +196,10 @@ Ice::ObjectPrx ReplicaSessionI::getEndpoint(const std::string& name) { Lock sync(*this); + if(_destroy) + { + return 0; + } return _replicaEndpoints[name]; } diff --git a/cpp/src/IceGrid/Topics.cpp b/cpp/src/IceGrid/Topics.cpp index cbb3f7766dc..20159fe4ec6 100644 --- a/cpp/src/IceGrid/Topics.cpp +++ b/cpp/src/IceGrid/Topics.cpp @@ -59,7 +59,7 @@ ObserverTopic::subscribe(const Ice::ObjectPrx& obsv, const string& name) { assert(_syncSubscribers.find(name) == _syncSubscribers.end()); _syncSubscribers.insert(name); - waitForSyncedSubscribers(_serial, name); + waitForSyncedSubscribersNoSync(_serial, name); } } @@ -138,6 +138,13 @@ ObserverTopic::receivedUpdate(const string& name, int serial, const string& fail void ObserverTopic::waitForSyncedSubscribers(int serial, const string& name) { + Lock sync(*this); + waitForSyncedSubscribersNoSync(serial, name); +} + +void +ObserverTopic::waitForSyncedSubscribersNoSync(int serial, const string& name) +{ if(_syncSubscribers.empty() && name.empty()) { return; @@ -150,6 +157,10 @@ ObserverTopic::waitForSyncedSubscribers(int serial, const string& name) } else { + if(_syncSubscribers.find(name) == _syncSubscribers.end()) + { + return; // Not subscribed anymore. + } _waitForUpdates[serial].insert(name); } @@ -519,7 +530,7 @@ ApplicationObserverTopic::applicationAdded(int serial, const ApplicationInfo& in Ice::Warning out(_logger); out << "unexpected exception while publishing `applicationAdded' update:\n" << ex; } - waitForSyncedSubscribers(serial); + waitForSyncedSubscribersNoSync(serial); } void @@ -541,7 +552,7 @@ ApplicationObserverTopic::applicationRemoved(int serial, const string& name) Ice::Warning out(_logger); out << "unexpected exception while publishing `applicationRemoved' update:\n" << ex; } - waitForSyncedSubscribers(serial); + waitForSyncedSubscribersNoSync(serial); } void @@ -594,7 +605,7 @@ ApplicationObserverTopic::applicationUpdated(int serial, const ApplicationUpdate Ice::Warning out(_logger); out << "unexpected exception while publishing `applicationUpdated' update:\n" << ex; } - waitForSyncedSubscribers(serial); + waitForSyncedSubscribersNoSync(serial); } void @@ -661,7 +672,7 @@ AdapterObserverTopic::adapterAdded(int serial, const AdapterInfo& info) Ice::Warning out(_logger); out << "unexpected exception while publishing `adapterAdded' update:\n" << ex; } - waitForSyncedSubscribers(serial); + waitForSyncedSubscribersNoSync(serial); } void @@ -683,7 +694,7 @@ AdapterObserverTopic::adapterUpdated(int serial, const AdapterInfo& info) Ice::Warning out(_logger); out << "unexpected exception while publishing `adapterUpdated' update:\n" << ex; } - waitForSyncedSubscribers(serial); + waitForSyncedSubscribersNoSync(serial); } void @@ -705,7 +716,7 @@ AdapterObserverTopic::adapterRemoved(int serial, const string& id) Ice::Warning out(_logger); out << "unexpected exception while publishing `adapterRemoved' update:\n" << ex; } - waitForSyncedSubscribers(serial); + waitForSyncedSubscribersNoSync(serial); } void @@ -772,7 +783,7 @@ ObjectObserverTopic::objectAdded(int serial, const ObjectInfo& info) Ice::Warning out(_logger); out << "unexpected exception while publishing `objectAdded' update:\n" << ex; } - waitForSyncedSubscribers(serial); + waitForSyncedSubscribersNoSync(serial); } void @@ -794,7 +805,7 @@ ObjectObserverTopic::objectUpdated(int serial, const ObjectInfo& info) Ice::Warning out(_logger); out << "unexpected exception while publishing `objectUpdated' update:\n" << ex; } - waitForSyncedSubscribers(serial); + waitForSyncedSubscribersNoSync(serial); } void @@ -816,7 +827,7 @@ ObjectObserverTopic::objectRemoved(int serial, const Ice::Identity& id) Ice::Warning out(_logger); out << "unexpected exception while publishing `objectRemoved' update:\n" << ex; } - waitForSyncedSubscribers(serial); + waitForSyncedSubscribersNoSync(serial); } void @@ -861,11 +872,10 @@ ObjectObserverTopic::objectsAddedOrUpdated(int serial, const ObjectInfoSeq& info } // - // We don't need to wait for the update to be received by the - // replicas here. This operation is only called internaly by - // IceGrid. + // We don't wait for the update to be received by the replicas + // here. This operation is called by ReplicaSessionI. // - //waitForSyncedSubscribers(serial); + //waitForSyncedSubscribersNoSync(serial); } void @@ -897,7 +907,7 @@ ObjectObserverTopic::objectsRemoved(int serial, const ObjectInfoSeq& infos) // replicas here. This operation is only called internaly by // IceGrid. // - //waitForSyncedSubscribers(serial); + //waitForSyncedSubscribersNoSync(serial); } void diff --git a/cpp/src/IceGrid/Topics.h b/cpp/src/IceGrid/Topics.h index 56554537ce9..13a75970b56 100644 --- a/cpp/src/IceGrid/Topics.h +++ b/cpp/src/IceGrid/Topics.h @@ -36,9 +36,11 @@ public: virtual void initObserver(const Ice::ObjectPrx&) = 0; + void waitForSyncedSubscribers(int, const std::string& = std::string()); + protected: - void waitForSyncedSubscribers(int, const std::string& = std::string()); + void waitForSyncedSubscribersNoSync(int, const std::string& = std::string()); void updateSerial(int); Ice::Context getContext(int) const; diff --git a/cpp/src/IceGrid/WellKnownObjectsManager.cpp b/cpp/src/IceGrid/WellKnownObjectsManager.cpp index fde27fc5bdb..d09bdde2f65 100644 --- a/cpp/src/IceGrid/WellKnownObjectsManager.cpp +++ b/cpp/src/IceGrid/WellKnownObjectsManager.cpp @@ -90,7 +90,7 @@ WellKnownObjectsManager::updateReplicatedWellKnownObjects() id.category = _database->getInstanceName(); ObjectInfo info; ObjectInfoSeq objects; - + Lock sync(*this); Ice::ObjectPrx replicatedClientProxy = _database->getReplicatedEndpoints("Client", _endpoints["Client"]); diff --git a/cpp/test/IceGrid/Makefile b/cpp/test/IceGrid/Makefile index 45af11a4680..e5486b4e076 100644 --- a/cpp/test/IceGrid/Makefile +++ b/cpp/test/IceGrid/Makefile @@ -12,7 +12,7 @@ top_srcdir = ../.. include $(top_srcdir)/config/Make.rules -SUBDIRS = simple deployer session update activation replication allocation +SUBDIRS = simple deployer session update activation replicaGroup allocation $(EVERYTHING):: @for subdir in $(SUBDIRS); \ diff --git a/cpp/test/IceGrid/Makefile.mak b/cpp/test/IceGrid/Makefile.mak index 423cc116f6e..8c0c556df09 100644 --- a/cpp/test/IceGrid/Makefile.mak +++ b/cpp/test/IceGrid/Makefile.mak @@ -12,7 +12,7 @@ top_srcdir = ..\.. !include $(top_srcdir)/config/Make.rules.mak -SUBDIRS = simple deployer session update activation replication allocation +SUBDIRS = simple deployer session update activation replicaGroup allocation $(EVERYTHING):: @for %i in ( $(SUBDIRS) ) do \ diff --git a/cpp/test/IceGrid/replicaGroup/.depend b/cpp/test/IceGrid/replicaGroup/.depend new file mode 100644 index 00000000000..e178a0e17e2 --- /dev/null +++ b/cpp/test/IceGrid/replicaGroup/.depend @@ -0,0 +1,9 @@ +Test$(OBJEXT): Test.cpp Test.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Handle.h ../../../include/IceUtil/Handle.h ../../../include/IceUtil/Exception.h ../../../include/IceUtil/Config.h ../../../include/Ice/Config.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ObjectF.h ../../../include/Ice/GCCountMap.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalObject.h ../../../include/IceUtil/Shared.h ../../../include/IceUtil/Mutex.h ../../../include/IceUtil/Lock.h ../../../include/IceUtil/ThreadException.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/ConnectionIF.h ../../../include/Ice/EndpointIF.h ../../../include/Ice/Endpoint.h ../../../include/Ice/UndefSysMacros.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/OutgoingAsyncF.h ../../../include/Ice/Current.h ../../../include/Ice/ConnectionF.h ../../../include/Ice/Identity.h ../../../include/Ice/StreamF.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/Object.h ../../../include/Ice/GCShared.h ../../../include/Ice/GCRecMutex.h ../../../include/IceUtil/RecMutex.h ../../../include/Ice/IncomingAsyncF.h ../../../include/Ice/Outgoing.h ../../../include/IceUtil/Monitor.h ../../../include/IceUtil/Cond.h ../../../include/IceUtil/Time.h ../../../include/Ice/BasicStream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/ObjectFactoryF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Protocol.h ../../../include/Ice/StringConverter.h ../../../include/IceUtil/Unicode.h ../../../include/Ice/Incoming.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/ServantManagerF.h ../../../include/Ice/Direct.h ../../../include/Ice/LocalException.h ../../../include/Ice/BuiltinSequences.h ../../../include/Ice/ObjectFactory.h ../../../include/IceUtil/Iterator.h ../../../include/IceUtil/ScopedArray.h +Client$(OBJEXT): Client.cpp ../../../include/Ice/Ice.h ../../../include/Ice/GCRecMutex.h ../../../include/IceUtil/RecMutex.h ../../../include/IceUtil/Config.h ../../../include/IceUtil/Lock.h ../../../include/IceUtil/ThreadException.h ../../../include/IceUtil/Exception.h ../../../include/Ice/Config.h ../../../include/Ice/GCShared.h ../../../include/Ice/GCCountMap.h ../../../include/Ice/GC.h ../../../include/IceUtil/Thread.h ../../../include/IceUtil/Shared.h ../../../include/IceUtil/Mutex.h ../../../include/IceUtil/Handle.h ../../../include/IceUtil/Monitor.h ../../../include/IceUtil/Cond.h ../../../include/IceUtil/Time.h ../../../include/Ice/Initialize.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalObject.h ../../../include/Ice/UndefSysMacros.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/InstanceF.h ../../../include/Ice/LoggerF.h ../../../include/Ice/StreamF.h ../../../include/Ice/StatsF.h ../../../include/Ice/StringConverter.h ../../../include/Ice/BuiltinSequences.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/ConnectionIF.h ../../../include/Ice/EndpointIF.h ../../../include/Ice/Endpoint.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/OutgoingAsyncF.h ../../../include/Ice/Current.h ../../../include/Ice/ConnectionF.h ../../../include/Ice/Identity.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/LoggerUtil.h ../../../include/Ice/Stats.h ../../../include/Ice/Communicator.h ../../../include/Ice/ObjectFactoryF.h ../../../include/Ice/RouterF.h ../../../include/Ice/LocatorF.h ../../../include/Ice/PluginF.h ../../../include/Ice/ObjectFactory.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/Object.h ../../../include/Ice/IncomingAsyncF.h ../../../include/Ice/Outgoing.h ../../../include/Ice/BasicStream.h ../../../include/Ice/Buffer.h ../../../include/Ice/Protocol.h ../../../include/IceUtil/Unicode.h ../../../include/Ice/OutgoingAsync.h ../../../include/Ice/Incoming.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/ServantManagerF.h ../../../include/Ice/IncomingAsync.h ../../../include/Ice/Direct.h ../../../include/Ice/UserExceptionFactory.h ../../../include/Ice/FactoryTable.h ../../../include/Ice/FactoryTableDef.h ../../../include/IceUtil/StaticMutex.h ../../../include/Ice/UserExceptionFactoryF.h ../../../include/Ice/FacetMap.h ../../../include/Ice/Locator.h ../../../include/Ice/ProcessF.h ../../../include/Ice/ServantLocator.h ../../../include/Ice/Process.h ../../../include/Ice/Application.h ../../../include/Ice/Connection.h ../../../include/Ice/Functional.h ../../../include/IceUtil/Functional.h ../../../include/Ice/Stream.h ../../include/TestCommon.h Test.h +AllTests$(OBJEXT): AllTests.cpp ../../../include/Ice/Ice.h ../../../include/Ice/GCRecMutex.h ../../../include/IceUtil/RecMutex.h ../../../include/IceUtil/Config.h ../../../include/IceUtil/Lock.h ../../../include/IceUtil/ThreadException.h ../../../include/IceUtil/Exception.h ../../../include/Ice/Config.h ../../../include/Ice/GCShared.h ../../../include/Ice/GCCountMap.h ../../../include/Ice/GC.h ../../../include/IceUtil/Thread.h ../../../include/IceUtil/Shared.h ../../../include/IceUtil/Mutex.h ../../../include/IceUtil/Handle.h ../../../include/IceUtil/Monitor.h ../../../include/IceUtil/Cond.h ../../../include/IceUtil/Time.h ../../../include/Ice/Initialize.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalObject.h ../../../include/Ice/UndefSysMacros.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/InstanceF.h ../../../include/Ice/LoggerF.h ../../../include/Ice/StreamF.h ../../../include/Ice/StatsF.h ../../../include/Ice/StringConverter.h ../../../include/Ice/BuiltinSequences.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/ConnectionIF.h ../../../include/Ice/EndpointIF.h ../../../include/Ice/Endpoint.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/OutgoingAsyncF.h ../../../include/Ice/Current.h ../../../include/Ice/ConnectionF.h ../../../include/Ice/Identity.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/LoggerUtil.h ../../../include/Ice/Stats.h ../../../include/Ice/Communicator.h ../../../include/Ice/ObjectFactoryF.h ../../../include/Ice/RouterF.h ../../../include/Ice/LocatorF.h ../../../include/Ice/PluginF.h ../../../include/Ice/ObjectFactory.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/Object.h ../../../include/Ice/IncomingAsyncF.h ../../../include/Ice/Outgoing.h ../../../include/Ice/BasicStream.h ../../../include/Ice/Buffer.h ../../../include/Ice/Protocol.h ../../../include/IceUtil/Unicode.h ../../../include/Ice/OutgoingAsync.h ../../../include/Ice/Incoming.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/ServantManagerF.h ../../../include/Ice/IncomingAsync.h ../../../include/Ice/Direct.h ../../../include/Ice/UserExceptionFactory.h ../../../include/Ice/FactoryTable.h ../../../include/Ice/FactoryTableDef.h ../../../include/IceUtil/StaticMutex.h ../../../include/Ice/UserExceptionFactoryF.h ../../../include/Ice/FacetMap.h ../../../include/Ice/Locator.h ../../../include/Ice/ProcessF.h ../../../include/Ice/ServantLocator.h ../../../include/Ice/Process.h ../../../include/Ice/Application.h ../../../include/Ice/Connection.h ../../../include/Ice/Functional.h ../../../include/IceUtil/Functional.h ../../../include/Ice/Stream.h ../../../include/Ice/IdentityUtil.h ../../../include/IceGrid/Query.h ../../../include/IceGrid/Exception.h ../../../include/IceGrid/Registry.h ../../../include/IceGrid/Session.h ../../../include/Glacier2/Session.h ../../../include/Glacier2/SSLInfo.h ../../../include/IceGrid/Admin.h ../../../include/Ice/SliceChecksumDict.h ../../../include/IceGrid/Descriptor.h ../../include/TestCommon.h Test.h +TestI$(OBJEXT): TestI.cpp ../../../include/Ice/Ice.h ../../../include/Ice/GCRecMutex.h ../../../include/IceUtil/RecMutex.h ../../../include/IceUtil/Config.h ../../../include/IceUtil/Lock.h ../../../include/IceUtil/ThreadException.h ../../../include/IceUtil/Exception.h ../../../include/Ice/Config.h ../../../include/Ice/GCShared.h ../../../include/Ice/GCCountMap.h ../../../include/Ice/GC.h ../../../include/IceUtil/Thread.h ../../../include/IceUtil/Shared.h ../../../include/IceUtil/Mutex.h ../../../include/IceUtil/Handle.h ../../../include/IceUtil/Monitor.h ../../../include/IceUtil/Cond.h ../../../include/IceUtil/Time.h ../../../include/Ice/Initialize.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalObject.h ../../../include/Ice/UndefSysMacros.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/InstanceF.h ../../../include/Ice/LoggerF.h ../../../include/Ice/StreamF.h ../../../include/Ice/StatsF.h ../../../include/Ice/StringConverter.h ../../../include/Ice/BuiltinSequences.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/ConnectionIF.h ../../../include/Ice/EndpointIF.h ../../../include/Ice/Endpoint.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/OutgoingAsyncF.h ../../../include/Ice/Current.h ../../../include/Ice/ConnectionF.h ../../../include/Ice/Identity.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/LoggerUtil.h ../../../include/Ice/Stats.h ../../../include/Ice/Communicator.h ../../../include/Ice/ObjectFactoryF.h ../../../include/Ice/RouterF.h ../../../include/Ice/LocatorF.h ../../../include/Ice/PluginF.h ../../../include/Ice/ObjectFactory.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/Object.h ../../../include/Ice/IncomingAsyncF.h ../../../include/Ice/Outgoing.h ../../../include/Ice/BasicStream.h ../../../include/Ice/Buffer.h ../../../include/Ice/Protocol.h ../../../include/IceUtil/Unicode.h ../../../include/Ice/OutgoingAsync.h ../../../include/Ice/Incoming.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/ServantManagerF.h ../../../include/Ice/IncomingAsync.h ../../../include/Ice/Direct.h ../../../include/Ice/UserExceptionFactory.h ../../../include/Ice/FactoryTable.h ../../../include/Ice/FactoryTableDef.h ../../../include/IceUtil/StaticMutex.h ../../../include/Ice/UserExceptionFactoryF.h ../../../include/Ice/FacetMap.h ../../../include/Ice/Locator.h ../../../include/Ice/ProcessF.h ../../../include/Ice/ServantLocator.h ../../../include/Ice/Process.h ../../../include/Ice/Application.h ../../../include/Ice/Connection.h ../../../include/Ice/Functional.h ../../../include/IceUtil/Functional.h ../../../include/Ice/Stream.h TestI.h Test.h +Server$(OBJEXT): Server.cpp ../../../include/Ice/Ice.h ../../../include/Ice/GCRecMutex.h ../../../include/IceUtil/RecMutex.h ../../../include/IceUtil/Config.h ../../../include/IceUtil/Lock.h ../../../include/IceUtil/ThreadException.h ../../../include/IceUtil/Exception.h ../../../include/Ice/Config.h ../../../include/Ice/GCShared.h ../../../include/Ice/GCCountMap.h ../../../include/Ice/GC.h ../../../include/IceUtil/Thread.h ../../../include/IceUtil/Shared.h ../../../include/IceUtil/Mutex.h ../../../include/IceUtil/Handle.h ../../../include/IceUtil/Monitor.h ../../../include/IceUtil/Cond.h ../../../include/IceUtil/Time.h ../../../include/Ice/Initialize.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalObject.h ../../../include/Ice/UndefSysMacros.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/InstanceF.h ../../../include/Ice/LoggerF.h ../../../include/Ice/StreamF.h ../../../include/Ice/StatsF.h ../../../include/Ice/StringConverter.h ../../../include/Ice/BuiltinSequences.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/ConnectionIF.h ../../../include/Ice/EndpointIF.h ../../../include/Ice/Endpoint.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/OutgoingAsyncF.h ../../../include/Ice/Current.h ../../../include/Ice/ConnectionF.h ../../../include/Ice/Identity.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/LoggerUtil.h ../../../include/Ice/Stats.h ../../../include/Ice/Communicator.h ../../../include/Ice/ObjectFactoryF.h ../../../include/Ice/RouterF.h ../../../include/Ice/LocatorF.h ../../../include/Ice/PluginF.h ../../../include/Ice/ObjectFactory.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/Object.h ../../../include/Ice/IncomingAsyncF.h ../../../include/Ice/Outgoing.h ../../../include/Ice/BasicStream.h ../../../include/Ice/Buffer.h ../../../include/Ice/Protocol.h ../../../include/IceUtil/Unicode.h ../../../include/Ice/OutgoingAsync.h ../../../include/Ice/Incoming.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/ServantManagerF.h ../../../include/Ice/IncomingAsync.h ../../../include/Ice/Direct.h ../../../include/Ice/UserExceptionFactory.h ../../../include/Ice/FactoryTable.h ../../../include/Ice/FactoryTableDef.h ../../../include/IceUtil/StaticMutex.h ../../../include/Ice/UserExceptionFactoryF.h ../../../include/Ice/FacetMap.h ../../../include/Ice/Locator.h ../../../include/Ice/ProcessF.h ../../../include/Ice/ServantLocator.h ../../../include/Ice/Process.h ../../../include/Ice/Application.h ../../../include/Ice/Connection.h ../../../include/Ice/Functional.h ../../../include/IceUtil/Functional.h ../../../include/Ice/Stream.h TestI.h Test.h ../../include/TestCommon.h +TestI$(OBJEXT): TestI.cpp ../../../include/Ice/Ice.h ../../../include/Ice/GCRecMutex.h ../../../include/IceUtil/RecMutex.h ../../../include/IceUtil/Config.h ../../../include/IceUtil/Lock.h ../../../include/IceUtil/ThreadException.h ../../../include/IceUtil/Exception.h ../../../include/Ice/Config.h ../../../include/Ice/GCShared.h ../../../include/Ice/GCCountMap.h ../../../include/Ice/GC.h ../../../include/IceUtil/Thread.h ../../../include/IceUtil/Shared.h ../../../include/IceUtil/Mutex.h ../../../include/IceUtil/Handle.h ../../../include/IceUtil/Monitor.h ../../../include/IceUtil/Cond.h ../../../include/IceUtil/Time.h ../../../include/Ice/Initialize.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalObject.h ../../../include/Ice/UndefSysMacros.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/InstanceF.h ../../../include/Ice/LoggerF.h ../../../include/Ice/StreamF.h ../../../include/Ice/StatsF.h ../../../include/Ice/StringConverter.h ../../../include/Ice/BuiltinSequences.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/ConnectionIF.h ../../../include/Ice/EndpointIF.h ../../../include/Ice/Endpoint.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/OutgoingAsyncF.h ../../../include/Ice/Current.h ../../../include/Ice/ConnectionF.h ../../../include/Ice/Identity.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/LoggerUtil.h ../../../include/Ice/Stats.h ../../../include/Ice/Communicator.h ../../../include/Ice/ObjectFactoryF.h ../../../include/Ice/RouterF.h ../../../include/Ice/LocatorF.h ../../../include/Ice/PluginF.h ../../../include/Ice/ObjectFactory.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/Object.h ../../../include/Ice/IncomingAsyncF.h ../../../include/Ice/Outgoing.h ../../../include/Ice/BasicStream.h ../../../include/Ice/Buffer.h ../../../include/Ice/Protocol.h ../../../include/IceUtil/Unicode.h ../../../include/Ice/OutgoingAsync.h ../../../include/Ice/Incoming.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/ServantManagerF.h ../../../include/Ice/IncomingAsync.h ../../../include/Ice/Direct.h ../../../include/Ice/UserExceptionFactory.h ../../../include/Ice/FactoryTable.h ../../../include/Ice/FactoryTableDef.h ../../../include/IceUtil/StaticMutex.h ../../../include/Ice/UserExceptionFactoryF.h ../../../include/Ice/FacetMap.h ../../../include/Ice/Locator.h ../../../include/Ice/ProcessF.h ../../../include/Ice/ServantLocator.h ../../../include/Ice/Process.h ../../../include/Ice/Application.h ../../../include/Ice/Connection.h ../../../include/Ice/Functional.h ../../../include/IceUtil/Functional.h ../../../include/Ice/Stream.h TestI.h Test.h +Service$(OBJEXT): Service.cpp ../../../include/Ice/Ice.h ../../../include/Ice/GCRecMutex.h ../../../include/IceUtil/RecMutex.h ../../../include/IceUtil/Config.h ../../../include/IceUtil/Lock.h ../../../include/IceUtil/ThreadException.h ../../../include/IceUtil/Exception.h ../../../include/Ice/Config.h ../../../include/Ice/GCShared.h ../../../include/Ice/GCCountMap.h ../../../include/Ice/GC.h ../../../include/IceUtil/Thread.h ../../../include/IceUtil/Shared.h ../../../include/IceUtil/Mutex.h ../../../include/IceUtil/Handle.h ../../../include/IceUtil/Monitor.h ../../../include/IceUtil/Cond.h ../../../include/IceUtil/Time.h ../../../include/Ice/Initialize.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalObject.h ../../../include/Ice/UndefSysMacros.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/InstanceF.h ../../../include/Ice/LoggerF.h ../../../include/Ice/StreamF.h ../../../include/Ice/StatsF.h ../../../include/Ice/StringConverter.h ../../../include/Ice/BuiltinSequences.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/ConnectionIF.h ../../../include/Ice/EndpointIF.h ../../../include/Ice/Endpoint.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/OutgoingAsyncF.h ../../../include/Ice/Current.h ../../../include/Ice/ConnectionF.h ../../../include/Ice/Identity.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/LoggerUtil.h ../../../include/Ice/Stats.h ../../../include/Ice/Communicator.h ../../../include/Ice/ObjectFactoryF.h ../../../include/Ice/RouterF.h ../../../include/Ice/LocatorF.h ../../../include/Ice/PluginF.h ../../../include/Ice/ObjectFactory.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/Object.h ../../../include/Ice/IncomingAsyncF.h ../../../include/Ice/Outgoing.h ../../../include/Ice/BasicStream.h ../../../include/Ice/Buffer.h ../../../include/Ice/Protocol.h ../../../include/IceUtil/Unicode.h ../../../include/Ice/OutgoingAsync.h ../../../include/Ice/Incoming.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/ServantManagerF.h ../../../include/Ice/IncomingAsync.h ../../../include/Ice/Direct.h ../../../include/Ice/UserExceptionFactory.h ../../../include/Ice/FactoryTable.h ../../../include/Ice/FactoryTableDef.h ../../../include/IceUtil/StaticMutex.h ../../../include/Ice/UserExceptionFactoryF.h ../../../include/Ice/FacetMap.h ../../../include/Ice/Locator.h ../../../include/Ice/ProcessF.h ../../../include/Ice/ServantLocator.h ../../../include/Ice/Process.h ../../../include/Ice/Application.h ../../../include/Ice/Connection.h ../../../include/Ice/Functional.h ../../../include/IceUtil/Functional.h ../../../include/Ice/Stream.h ../../../include/IceBox/IceBox.h ../../../include/Ice/SliceChecksumDict.h TestI.h Test.h +Test.cpp: Test.ice +Test.ice: $(SLICE2CPP) $(SLICEPARSERLIB) diff --git a/cpp/test/IceGrid/replicaGroup/AllTests.cpp b/cpp/test/IceGrid/replicaGroup/AllTests.cpp new file mode 100644 index 00000000000..d949c81ced4 --- /dev/null +++ b/cpp/test/IceGrid/replicaGroup/AllTests.cpp @@ -0,0 +1,412 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** + +#include <Ice/Ice.h> +#include <Ice/BuiltinSequences.h> +#include <Ice/IdentityUtil.h> +#include <IceGrid/Query.h> +#include <IceGrid/Registry.h> +#include <IceGrid/Admin.h> +#include <TestCommon.h> +#include <Test.h> + +using namespace std; +using namespace Test; +using namespace IceGrid; + +class SessionKeepAliveThread : public IceUtil::Thread, public IceUtil::Monitor<IceUtil::Mutex> +{ +public: + + SessionKeepAliveThread(const IceGrid::AdminSessionPrx& session, long timeout) : + _session(session), + _timeout(IceUtil::Time::seconds(timeout)), + _destroy(false) + { + } + + virtual void + run() + { + Lock sync(*this); + while(!_destroy) + { + timedWait(_timeout); + if(_destroy) + { + break; + } + try + { + _session->keepAlive(); + } + catch(const Ice::Exception&) + { + break; + } + } + } + + void + destroy() + { + Lock sync(*this); + _destroy = true; + notify(); + } + +private: + + IceGrid::AdminSessionPrx _session; + const IceUtil::Time _timeout; + bool _destroy; +}; + +typedef IceUtil::Handle<SessionKeepAliveThread> SessionKeepAliveThreadPtr; + +void +instantiateServer(const AdminPrx& admin, const string& templ, const string& node, const map<string, string>& params) +{ + ServerInstanceDescriptor desc; + desc._cpp_template = templ; + desc.parameterValues = params; + NodeUpdateDescriptor nodeUpdate; + nodeUpdate.name = node; + nodeUpdate.serverInstances.push_back(desc); + ApplicationUpdateDescriptor update; + update.name = "Test"; + update.nodes.push_back(nodeUpdate); + try + { + admin->updateApplication(update); + } + catch(DeploymentException& ex) + { + cerr << ex.reason << endl; + test(false); + } +} + +void +removeServer(const AdminPrx& admin, const string& id) +{ + try + { + admin->stopServer(id); + } + catch(const ServerStopException&) + { + } + catch(const NodeUnreachableException&) + { + } + catch(const Ice::UserException& ex) + { + cerr << ex << endl; + test(false); + } + + NodeUpdateDescriptor nodeUpdate; + nodeUpdate.name = "localnode"; + nodeUpdate.removeServers.push_back(id); + ApplicationUpdateDescriptor update; + update.name = "Test"; + update.nodes.push_back(nodeUpdate); + try + { + admin->updateApplication(update); + } + catch(DeploymentException& ex) + { + cerr << ex.reason << endl; + test(false); + } +} + +void +allTests(const Ice::CommunicatorPtr& comm) +{ + RegistryPrx registry = IceGrid::RegistryPrx::checkedCast(comm->stringToProxy("IceGrid/Registry")); + test(registry); + AdminSessionPrx session = registry->createAdminSession("foo", "bar"); + session->startUpdate(); + + SessionKeepAliveThreadPtr keepAlive = new SessionKeepAliveThread(session, registry->getSessionTimeout()/2); + keepAlive->start(); + + AdminPrx admin = session->getAdmin(); + test(admin); + + set<string> serverReplicaIds; + serverReplicaIds.insert("Server1.ReplicatedAdapter"); + serverReplicaIds.insert("Server2.ReplicatedAdapter"); + serverReplicaIds.insert("Server3.ReplicatedAdapter"); + set<string> svcReplicaIds; + svcReplicaIds.insert("IceBox1.Service1.Service1"); + svcReplicaIds.insert("IceBox1.Service2.Service2"); + svcReplicaIds.insert("IceBox1.Service3.Service3"); + + cout << "testing replication without load balancing... " << flush; + { + map<string, string> params; + params["replicaGroup"] = "Default"; + params["id"] = "Server1"; + instantiateServer(admin, "Server", "localnode", params); + params["id"] = "Server2"; + instantiateServer(admin, "Server", "localnode", params); + params["id"] = "Server3"; + instantiateServer(admin, "Server", "localnode", params); + set<string> replicaIds = serverReplicaIds; + TestIntfPrx obj = TestIntfPrx::uncheckedCast(comm->stringToProxy("Default")); + try + { + test(replicaIds.erase(obj->getReplicaIdAndShutdown()) == 1); + test(replicaIds.erase(obj->getReplicaIdAndShutdown()) == 1); + test(replicaIds.erase(obj->getReplicaIdAndShutdown()) == 1); + } + catch(const Ice::LocalException& ex) + { + cerr << ex << endl; + test(false); + } + removeServer(admin, "Server1"); + removeServer(admin, "Server2"); + removeServer(admin, "Server3"); + } + { + map<string, string> params; + params["replicaGroup"] = "Default"; + params["id"] = "IceBox1"; + instantiateServer(admin, "IceBox", "localnode", params); + set<string> replicaIds = svcReplicaIds; + TestIntfPrx obj = TestIntfPrx::uncheckedCast(comm->stringToProxy("Default")); + try + { + test(replicaIds.erase(obj->getReplicaIdAndShutdown()) == 1); + test(replicaIds.erase(obj->getReplicaIdAndShutdown()) == 1); + test(replicaIds.erase(obj->getReplicaIdAndShutdown()) == 1); + } + catch(const Ice::LocalException& ex) + { + cerr << ex << endl; + test(false); + } + removeServer(admin, "IceBox1"); + } + cout << "ok" << endl; + + cout << "testing replication with round-robin load balancing... " << flush; + { + map<string, string> params; + params["replicaGroup"] = "RoundRobin"; + params["id"] = "Server1"; + instantiateServer(admin, "Server", "localnode", params); + params["id"] = "Server2"; + instantiateServer(admin, "Server", "localnode", params); + params["id"] = "Server3"; + instantiateServer(admin, "Server", "localnode", params); + TestIntfPrx obj = TestIntfPrx::uncheckedCast(comm->stringToProxy("RoundRobin")); + try + { + test(obj->getReplicaIdAndShutdown() == "Server1.ReplicatedAdapter"); + test(obj->getReplicaIdAndShutdown() == "Server2.ReplicatedAdapter"); + test(obj->getReplicaIdAndShutdown() == "Server3.ReplicatedAdapter"); + } + catch(const Ice::LocalException& ex) + { + cerr << ex << endl; + test(false); + } + removeServer(admin, "Server1"); + removeServer(admin, "Server2"); + removeServer(admin, "Server3"); + } + { + map<string, string> params; + params["replicaGroup"] = "RoundRobin"; + params["id"] = "IceBox1"; + instantiateServer(admin, "IceBox", "localnode", params); + TestIntfPrx obj = TestIntfPrx::uncheckedCast(comm->stringToProxy("RoundRobin")); + try + { + test(obj->getReplicaIdAndShutdown() == "IceBox1.Service1.Service1"); + test(obj->getReplicaIdAndShutdown() == "IceBox1.Service2.Service2"); + test(obj->getReplicaIdAndShutdown() == "IceBox1.Service3.Service3"); + } + catch(const Ice::LocalException& ex) + { + cerr << ex << endl; + test(false); + } + removeServer(admin, "IceBox1"); + } + cout << "ok" << endl; + + cout << "testing replication with random load balancing... " << flush; + { + map<string, string> params; + params["replicaGroup"] = "Random"; + params["id"] = "Server1"; + instantiateServer(admin, "Server", "localnode", params); + params["id"] = "Server2"; + instantiateServer(admin, "Server", "localnode", params); + params["id"] = "Server3"; + instantiateServer(admin, "Server", "localnode", params); + TestIntfPrx obj = TestIntfPrx::uncheckedCast(comm->stringToProxy("Random")); + set<string> replicaIds = serverReplicaIds; + while(!replicaIds.empty()) + { + try + { + replicaIds.erase(obj->getReplicaIdAndShutdown()); + } + catch(const Ice::LocalException& ex) + { + cerr << ex << endl; + test(false); + } + } + removeServer(admin, "Server1"); + removeServer(admin, "Server2"); + removeServer(admin, "Server3"); + } + { + map<string, string> params; + params["replicaGroup"] = "Random"; + params["id"] = "IceBox1"; + instantiateServer(admin, "IceBox", "localnode", params); + TestIntfPrx obj = TestIntfPrx::uncheckedCast(comm->stringToProxy("Random")); + set<string> replicaIds = svcReplicaIds; + while(!replicaIds.empty()) + { + try + { + replicaIds.erase(obj->getReplicaIdAndShutdown()); + } + catch(const Ice::ConnectionRefusedException&) + { + } + catch(const Ice::LocalException& ex) + { + cerr << ex << endl; + test(false); + } + } + removeServer(admin, "IceBox1"); + } + cout << "ok" << endl; + + cout << "testing replication with adaptive load balancing... " << flush; + { + map<string, string> params; + params["replicaGroup"] = "Adaptive"; + params["id"] = "Server1"; + instantiateServer(admin, "Server", "localnode", params); + params["id"] = "Server2"; + instantiateServer(admin, "Server", "localnode", params); + params["id"] = "Server3"; + instantiateServer(admin, "Server", "localnode", params); + TestIntfPrx obj = TestIntfPrx::uncheckedCast(comm->stringToProxy("Adaptive")); + set<string> replicaIds = serverReplicaIds; + while(!replicaIds.empty()) + { + try + { + replicaIds.erase(obj->getReplicaIdAndShutdown()); + } + catch(const Ice::LocalException& ex) + { + cerr << ex << endl; + test(false); + } + } + removeServer(admin, "Server1"); + removeServer(admin, "Server2"); + removeServer(admin, "Server3"); + } + { + map<string, string> params; + params["replicaGroup"] = "Adaptive"; + params["id"] = "IceBox1"; + instantiateServer(admin, "IceBox", "localnode", params); + TestIntfPrx obj = TestIntfPrx::uncheckedCast(comm->stringToProxy("Adaptive")); + set<string> replicaIds = svcReplicaIds; + while(!replicaIds.empty()) + { + try + { + replicaIds.erase(obj->getReplicaIdAndShutdown()); + } + catch(const Ice::ConnectionRefusedException&) + { + } + catch(const Ice::LocalException& ex) + { + cerr << ex << endl; + test(false); + } + } + removeServer(admin, "IceBox1"); + } + cout << "ok" << endl; + + cout << "testing replication with inactive nodes... " << flush; + { + map<string, string> params; + + params["replicaGroup"] = "Random"; + params["id"] = "Server1"; + instantiateServer(admin, "Server", "inactivenode", params); + params["id"] = "Server2"; + instantiateServer(admin, "Server", "localnode", params); + TestIntfPrx obj = TestIntfPrx::uncheckedCast(comm->stringToProxy("Random")); + test(obj->getReplicaIdAndShutdown() == "Server2.ReplicatedAdapter"); + removeServer(admin, "Server1"); + removeServer(admin, "Server2"); + + params["replicaGroup"] = "RoundRobin"; + params["id"] = "Server1"; + instantiateServer(admin, "Server", "inactivenode", params); + params["id"] = "Server2"; + instantiateServer(admin, "Server", "localnode", params); + obj = TestIntfPrx::uncheckedCast(comm->stringToProxy("RoundRobin")); + test(obj->getReplicaIdAndShutdown() == "Server2.ReplicatedAdapter"); + removeServer(admin, "Server1"); + removeServer(admin, "Server2"); + + params["replicaGroup"] = "Adaptive"; + params["id"] = "Server1"; + instantiateServer(admin, "Server", "inactivenode", params); + params["id"] = "Server2"; + instantiateServer(admin, "Server", "localnode", params); + obj = TestIntfPrx::uncheckedCast(comm->stringToProxy("Adaptive")); + test(obj->getReplicaIdAndShutdown() == "Server2.ReplicatedAdapter"); + removeServer(admin, "Server1"); + removeServer(admin, "Server2"); + + params["replicaGroup"] = "Random"; + params["id"] = "IceBox1"; + instantiateServer(admin, "IceBox", "localnode", params); + params["id"] = "Server1"; + instantiateServer(admin, "Server", "inactivenode", params); + obj = TestIntfPrx::uncheckedCast(comm->stringToProxy("Random")); + test(svcReplicaIds.find(obj->getReplicaIdAndShutdown()) != svcReplicaIds.end()); + removeServer(admin, "IceBox1"); + removeServer(admin, "Server1"); + }; + cout << "ok" << endl; + + session->finishUpdate(); + + keepAlive->destroy(); + keepAlive->getThreadControl().join(); + keepAlive = 0; + + session->destroy(); +} diff --git a/cpp/test/IceGrid/replicaGroup/Client.cpp b/cpp/test/IceGrid/replicaGroup/Client.cpp new file mode 100644 index 00000000000..ad32326fc12 --- /dev/null +++ b/cpp/test/IceGrid/replicaGroup/Client.cpp @@ -0,0 +1,55 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** + +#include <Ice/Ice.h> +#include <TestCommon.h> +#include <Test.h> + +using namespace std; + +int +run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) +{ + void allTests(const Ice::CommunicatorPtr&); + allTests(communicator); + return EXIT_SUCCESS; +} + +int +main(int argc, char* argv[]) +{ + int status; + Ice::CommunicatorPtr communicator; + + try + { + communicator = Ice::initialize(argc, argv); + status = run(argc, argv, communicator); + } + catch(const Ice::Exception& ex) + { + cerr << ex << endl; + status = EXIT_FAILURE; + } + + if(communicator) + { + try + { + communicator->destroy(); + } + catch(const Ice::Exception& ex) + { + cerr << ex << endl; + status = EXIT_FAILURE; + } + } + + return status; +} diff --git a/cpp/test/IceGrid/replicaGroup/Makefile.mak b/cpp/test/IceGrid/replicaGroup/Makefile.mak new file mode 100644 index 00000000000..13f166999c0 --- /dev/null +++ b/cpp/test/IceGrid/replicaGroup/Makefile.mak @@ -0,0 +1,75 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved. +# +# This copy of Ice is licensed to you under the terms described in the +# ICE_LICENSE file included in this distribution. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe + +LIBNAME = testservice$(LIBSUFFIX).lib +DLLNAME = testservice$(LIBSUFFIX).dll + +TARGETS = $(CLIENT) $(SERVER) $(LIBNAME) $(DLLNAME) + +OBJS = Test.obj + +COBJS = Client.obj \ + AllTests.obj + +SOBJS = TestI.obj \ + Server.obj + +SERVICE_OBJS = TestI.obj \ + Service.obj + +SRCS = $(OBJS:.obj=.cpp) \ + $(COBJS:.obj=.cpp) \ + $(SOBJS:.obj=.cpp) \ + $(SERVICE_OBJS:.obj=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. -I../../include $(CPPFLAGS) +LINKWITH = $(LIBS) icebox$(LIBSUFFIX).lib + +!if "$(BORLAND_HOME)" == "" & "$(OPTIMIZE)" != "yes" +PDBFLAGS = /pdb:$(DLLNAME:.dll=.pdb) +CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb) +SPDBFLAGS = /pdb:$(SERVER:.exe=.pdb) +!endif + +$(LIBNAME) : $(DLLNAME) + +$(DLLNAME): $(OBJS) $(SERVICE_OBJS) + $(LINK) $(LD_DLLFLAGS) $(PDBFLAGS) $(OBJS) $(SERVICE_OBJS) $(PREOUT)$(DLLNAME) $(PRELIBS)$(LINKWITH) \ + freeze$(LIBSUFFIX).lib + +$(CLIENT): $(OBJS) $(COBJS) + $(LINK) $(LD_EXEFLAGS) $(CPDBFLAGS) $(OBJS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) \ + icegrid$(LIBSUFFIX).lib glacier2$(LIBSUFFIX).lib + +$(SERVER): $(OBJS) $(SOBJS) + $(LINK) $(LD_EXEFLAGS) $(SPDBFLAGS) $(OBJS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + +clean:: + del /q Test.cpp Test.h + +!if "$(OPTIMIZE)" == "yes" + +all:: + @echo release > build.txt + +!else + +all:: + @echo debug > build.txt + +!endif + +!include .depend diff --git a/cpp/test/IceGrid/replicaGroup/Server.cpp b/cpp/test/IceGrid/replicaGroup/Server.cpp new file mode 100644 index 00000000000..d5062de1f3c --- /dev/null +++ b/cpp/test/IceGrid/replicaGroup/Server.cpp @@ -0,0 +1,47 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** + +#include <Ice/Ice.h> +#include <TestI.h> +#include <TestCommon.h> + +using namespace std; + +class Server : public Ice::Application +{ +public: + + virtual int run(int argc, char* argv[]); +}; + +int +Server::run(int argc, char* argv[]) +{ + Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("ReplicatedAdapter"); + Ice::ObjectPtr object = new TestI(adapter, communicator()->getProperties()); + adapter->add(object, communicator()->stringToIdentity(communicator()->getProperties()->getProperty("Identity"))); + shutdownOnInterrupt(); + try + { + adapter->activate(); + } + catch(const Ice::ObjectAdapterDeactivatedException&) + { + } + communicator()->waitForShutdown(); + ignoreInterrupt(); + return EXIT_SUCCESS; +} + +int +main(int argc, char* argv[]) +{ + Server app; + return app.main(argc, argv); +} diff --git a/cpp/test/IceGrid/replication/Service.cpp b/cpp/test/IceGrid/replicaGroup/Service.cpp index cca1dda551c..cca1dda551c 100644 --- a/cpp/test/IceGrid/replication/Service.cpp +++ b/cpp/test/IceGrid/replicaGroup/Service.cpp diff --git a/cpp/test/IceGrid/replicaGroup/Test.ice b/cpp/test/IceGrid/replicaGroup/Test.ice new file mode 100644 index 00000000000..915c244604e --- /dev/null +++ b/cpp/test/IceGrid/replicaGroup/Test.ice @@ -0,0 +1,23 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** + +#ifndef TEST_ICE +#define TEST_ICE + +module Test +{ + +interface TestIntf +{ + string getReplicaIdAndShutdown(); +}; + +}; + +#endif diff --git a/cpp/test/IceGrid/replicaGroup/TestI.cpp b/cpp/test/IceGrid/replicaGroup/TestI.cpp new file mode 100644 index 00000000000..ffaba14f47f --- /dev/null +++ b/cpp/test/IceGrid/replicaGroup/TestI.cpp @@ -0,0 +1,24 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** + +#include <Ice/Ice.h> +#include <TestI.h> + +TestI::TestI(const Ice::ObjectAdapterPtr& adapter, const Ice::PropertiesPtr& properties) : + _adapter(adapter), + _properties(properties) +{ +} + +std::string +TestI::getReplicaIdAndShutdown(const Ice::Current&) +{ + _adapter->getCommunicator()->shutdown(); + return _properties->getProperty(_adapter->getName() + ".AdapterId"); +} diff --git a/cpp/test/IceGrid/replicaGroup/TestI.h b/cpp/test/IceGrid/replicaGroup/TestI.h new file mode 100644 index 00000000000..120761a6b3e --- /dev/null +++ b/cpp/test/IceGrid/replicaGroup/TestI.h @@ -0,0 +1,29 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** + +#ifndef TEST_I_H +#define TEST_I_H + +#include <Test.h> + +class TestI : public ::Test::TestIntf +{ +public: + + TestI(const Ice::ObjectAdapterPtr&, const Ice::PropertiesPtr&); + + virtual std::string getReplicaIdAndShutdown(const Ice::Current&); + +private: + + Ice::ObjectAdapterPtr _adapter; + Ice::PropertiesPtr _properties; +}; + +#endif diff --git a/cpp/test/IceGrid/replicaGroup/application.xml b/cpp/test/IceGrid/replicaGroup/application.xml new file mode 100644 index 00000000000..04bbf99980c --- /dev/null +++ b/cpp/test/IceGrid/replicaGroup/application.xml @@ -0,0 +1,57 @@ +<icegrid> + + <application name="Test"> + + <replica-group id="Default"> + <object identity="Default" type="::Test::TestIntf"/> + </replica-group> + + <replica-group id="RoundRobin"> + <load-balancing type="round-robin" n-replicas="1"/> + <object identity="RoundRobin" type="::Test::TestIntf"/> + </replica-group> + + <replica-group id="Adaptive"> + <load-balancing type="adaptive" n-replicas="1"/> + <object identity="Adaptive" type="::Test::TestIntf"/> + </replica-group> + + <replica-group id="Random"> + <load-balancing type="random" n-replicas="1"/> + <object identity="Random" type="::Test::TestIntf"/> + </replica-group> + + <server-template id="Server"> + <parameter name="id"/> + <parameter name="replicaGroup"/> + <server id="${id}" exe="${test.dir}/server" activation="on-demand" pwd="."> + <adapter name="ReplicatedAdapter" endpoints="default" replica-group="${replicaGroup}"/> + <property name="Identity" value="${replicaGroup}"/> + </server> + </server-template> + + <service-template id="Service"> + <parameter name="name"/> + <parameter name="replicaGroup"/> + <service name="${name}" entry="TestService:create"> + <adapter name="${service}" endpoints="default" replica-group="${replicaGroup}"> + <object identity="${service}"/> + </adapter> + <property name="Identity" value="${replicaGroup}"/> + </service> + </service-template> + + <server-template id="IceBox"> + <parameter name="id"/> + <parameter name="replicaGroup"/> + <icebox id="${id}" exe="${icebox.exe}" activation="on-demand" pwd="."> + <adapter name="IceBox.ServiceManager" endpoints="tcp -h 127.0.0.1" register-process="true"/> + <service-instance template="Service" name="Service1" replicaGroup="${replicaGroup}"/> + <service-instance template="Service" name="Service2" replicaGroup="${replicaGroup}"/> + <service-instance template="Service" name="Service3" replicaGroup="${replicaGroup}"/> + </icebox> + </server-template> + + </application> + +</icegrid> diff --git a/cpp/test/IceGrid/replicaGroup/db/.dummy b/cpp/test/IceGrid/replicaGroup/db/.dummy new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/cpp/test/IceGrid/replicaGroup/db/.dummy diff --git a/cpp/test/IceGrid/replicaGroup/run.py b/cpp/test/IceGrid/replicaGroup/run.py new file mode 100755 index 00000000000..26c256967ec --- /dev/null +++ b/cpp/test/IceGrid/replicaGroup/run.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python +# ********************************************************************** +# +# Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved. +# +# This copy of Ice is licensed to you under the terms described in the +# ICE_LICENSE file included in this distribution. +# +# ********************************************************************** + +import os, sys + +for toplevel in [".", "..", "../..", "../../..", "../../../.."]: + toplevel = os.path.normpath(toplevel) + if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")): + break +else: + raise "can't find toplevel directory!" + +sys.path.append(os.path.join(toplevel, "config")) +import TestUtil +import IceGridAdmin + +name = os.path.join("IceGrid", "replicaGroup") +testdir = os.path.join(toplevel, "test", name) + +TestUtil.addLdPath(testdir) + +IceGridAdmin.iceGridTest(name, "application.xml", "--Ice.RetryIntervals=\"0 50 100 250\"", \ + "icebox.exe=" + TestUtil.getIceBox(testdir)) +sys.exit(0) diff --git a/cpp/test/IceGrid/replication/.depend b/cpp/test/IceGrid/replication/.depend index ce780dbf5a2..31db06ede58 100644 --- a/cpp/test/IceGrid/replication/.depend +++ b/cpp/test/IceGrid/replication/.depend @@ -1,9 +1,7 @@ -Test$(OBJEXT): Test.cpp Test.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Handle.h ../../../include/IceUtil/Handle.h ../../../include/IceUtil/Exception.h ../../../include/IceUtil/Config.h ../../../include/Ice/Config.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ObjectF.h ../../../include/Ice/GCCountMap.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalObject.h ../../../include/IceUtil/Shared.h ../../../include/Ice/Proxy.h ../../../include/IceUtil/Mutex.h ../../../include/IceUtil/Lock.h ../../../include/IceUtil/ThreadException.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/ConnectionIF.h ../../../include/Ice/EndpointIF.h ../../../include/Ice/Endpoint.h ../../../include/Ice/UndefSysMacros.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/OutgoingAsyncF.h ../../../include/Ice/Current.h ../../../include/Ice/ConnectionF.h ../../../include/Ice/Identity.h ../../../include/Ice/StreamF.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/Object.h ../../../include/Ice/GCShared.h ../../../include/Ice/GCRecMutex.h ../../../include/IceUtil/RecMutex.h ../../../include/Ice/IncomingAsyncF.h ../../../include/Ice/Outgoing.h ../../../include/IceUtil/Monitor.h ../../../include/IceUtil/Cond.h ../../../include/IceUtil/Time.h ../../../include/Ice/BasicStream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/ObjectFactoryF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Protocol.h ../../../include/Ice/StringConverter.h ../../../include/IceUtil/Unicode.h ../../../include/Ice/Incoming.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/ServantManagerF.h ../../../include/Ice/Direct.h ../../../include/Ice/LocalException.h ../../../include/Ice/BuiltinSequences.h ../../../include/Ice/ObjectFactory.h ../../../include/IceUtil/Iterator.h ../../../include/IceUtil/ScopedArray.h -Client$(OBJEXT): Client.cpp ../../../include/Ice/Ice.h ../../../include/Ice/GCRecMutex.h ../../../include/IceUtil/RecMutex.h ../../../include/IceUtil/Config.h ../../../include/IceUtil/Lock.h ../../../include/IceUtil/ThreadException.h ../../../include/IceUtil/Exception.h ../../../include/Ice/Config.h ../../../include/Ice/GCShared.h ../../../include/Ice/GCCountMap.h ../../../include/Ice/GC.h ../../../include/IceUtil/Thread.h ../../../include/IceUtil/Shared.h ../../../include/IceUtil/Handle.h ../../../include/IceUtil/Mutex.h ../../../include/IceUtil/Monitor.h ../../../include/IceUtil/Cond.h ../../../include/IceUtil/Time.h ../../../include/Ice/Initialize.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalObject.h ../../../include/Ice/UndefSysMacros.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/InstanceF.h ../../../include/Ice/LoggerF.h ../../../include/Ice/StreamF.h ../../../include/Ice/StatsF.h ../../../include/Ice/StringConverter.h ../../../include/Ice/BuiltinSequences.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/ConnectionIF.h ../../../include/Ice/EndpointIF.h ../../../include/Ice/Endpoint.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/OutgoingAsyncF.h ../../../include/Ice/Current.h ../../../include/Ice/ConnectionF.h ../../../include/Ice/Identity.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/LoggerUtil.h ../../../include/Ice/Stats.h ../../../include/Ice/Communicator.h ../../../include/Ice/ObjectFactoryF.h ../../../include/Ice/RouterF.h ../../../include/Ice/LocatorF.h ../../../include/Ice/PluginF.h ../../../include/Ice/ObjectFactory.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/Object.h ../../../include/Ice/IncomingAsyncF.h ../../../include/Ice/Outgoing.h ../../../include/Ice/BasicStream.h ../../../include/Ice/Buffer.h ../../../include/Ice/Protocol.h ../../../include/IceUtil/Unicode.h ../../../include/Ice/OutgoingAsync.h ../../../include/Ice/Incoming.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/ServantManagerF.h ../../../include/Ice/IncomingAsync.h ../../../include/Ice/Direct.h ../../../include/Ice/UserExceptionFactory.h ../../../include/Ice/FactoryTable.h ../../../include/Ice/FactoryTableDef.h ../../../include/IceUtil/StaticMutex.h ../../../include/Ice/UserExceptionFactoryF.h ../../../include/Ice/FacetMap.h ../../../include/Ice/Locator.h ../../../include/Ice/ProcessF.h ../../../include/Ice/ServantLocator.h ../../../include/Ice/Process.h ../../../include/Ice/Application.h ../../../include/Ice/Connection.h ../../../include/Ice/Functional.h ../../../include/IceUtil/Functional.h ../../../include/Ice/Stream.h ../../include/TestCommon.h Test.h -AllTests$(OBJEXT): AllTests.cpp ../../../include/Ice/Ice.h ../../../include/Ice/GCRecMutex.h ../../../include/IceUtil/RecMutex.h ../../../include/IceUtil/Config.h ../../../include/IceUtil/Lock.h ../../../include/IceUtil/ThreadException.h ../../../include/IceUtil/Exception.h ../../../include/Ice/Config.h ../../../include/Ice/GCShared.h ../../../include/Ice/GCCountMap.h ../../../include/Ice/GC.h ../../../include/IceUtil/Thread.h ../../../include/IceUtil/Shared.h ../../../include/IceUtil/Handle.h ../../../include/IceUtil/Mutex.h ../../../include/IceUtil/Monitor.h ../../../include/IceUtil/Cond.h ../../../include/IceUtil/Time.h ../../../include/Ice/Initialize.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalObject.h ../../../include/Ice/UndefSysMacros.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/InstanceF.h ../../../include/Ice/LoggerF.h ../../../include/Ice/StreamF.h ../../../include/Ice/StatsF.h ../../../include/Ice/StringConverter.h ../../../include/Ice/BuiltinSequences.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/ConnectionIF.h ../../../include/Ice/EndpointIF.h ../../../include/Ice/Endpoint.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/OutgoingAsyncF.h ../../../include/Ice/Current.h ../../../include/Ice/ConnectionF.h ../../../include/Ice/Identity.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/LoggerUtil.h ../../../include/Ice/Stats.h ../../../include/Ice/Communicator.h ../../../include/Ice/ObjectFactoryF.h ../../../include/Ice/RouterF.h ../../../include/Ice/LocatorF.h ../../../include/Ice/PluginF.h ../../../include/Ice/ObjectFactory.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/Object.h ../../../include/Ice/IncomingAsyncF.h ../../../include/Ice/Outgoing.h ../../../include/Ice/BasicStream.h ../../../include/Ice/Buffer.h ../../../include/Ice/Protocol.h ../../../include/IceUtil/Unicode.h ../../../include/Ice/OutgoingAsync.h ../../../include/Ice/Incoming.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/ServantManagerF.h ../../../include/Ice/IncomingAsync.h ../../../include/Ice/Direct.h ../../../include/Ice/UserExceptionFactory.h ../../../include/Ice/FactoryTable.h ../../../include/Ice/FactoryTableDef.h ../../../include/IceUtil/StaticMutex.h ../../../include/Ice/UserExceptionFactoryF.h ../../../include/Ice/FacetMap.h ../../../include/Ice/Locator.h ../../../include/Ice/ProcessF.h ../../../include/Ice/ServantLocator.h ../../../include/Ice/Process.h ../../../include/Ice/Application.h ../../../include/Ice/Connection.h ../../../include/Ice/Functional.h ../../../include/IceUtil/Functional.h ../../../include/Ice/Stream.h ../../../include/Ice/IdentityUtil.h ../../../include/IceGrid/Query.h ../../../include/IceGrid/Exception.h ../../../include/IceGrid/Registry.h ../../../include/IceGrid/Session.h ../../../include/Glacier2/Session.h ../../../include/Glacier2/SSLInfo.h ../../../include/IceGrid/Admin.h ../../../include/Ice/SliceChecksumDict.h ../../../include/IceGrid/Descriptor.h ../../include/TestCommon.h Test.h -TestI$(OBJEXT): TestI.cpp ../../../include/Ice/Ice.h ../../../include/Ice/GCRecMutex.h ../../../include/IceUtil/RecMutex.h ../../../include/IceUtil/Config.h ../../../include/IceUtil/Lock.h ../../../include/IceUtil/ThreadException.h ../../../include/IceUtil/Exception.h ../../../include/Ice/Config.h ../../../include/Ice/GCShared.h ../../../include/Ice/GCCountMap.h ../../../include/Ice/GC.h ../../../include/IceUtil/Thread.h ../../../include/IceUtil/Shared.h ../../../include/IceUtil/Handle.h ../../../include/IceUtil/Mutex.h ../../../include/IceUtil/Monitor.h ../../../include/IceUtil/Cond.h ../../../include/IceUtil/Time.h ../../../include/Ice/Initialize.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalObject.h ../../../include/Ice/UndefSysMacros.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/InstanceF.h ../../../include/Ice/LoggerF.h ../../../include/Ice/StreamF.h ../../../include/Ice/StatsF.h ../../../include/Ice/StringConverter.h ../../../include/Ice/BuiltinSequences.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/ConnectionIF.h ../../../include/Ice/EndpointIF.h ../../../include/Ice/Endpoint.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/OutgoingAsyncF.h ../../../include/Ice/Current.h ../../../include/Ice/ConnectionF.h ../../../include/Ice/Identity.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/LoggerUtil.h ../../../include/Ice/Stats.h ../../../include/Ice/Communicator.h ../../../include/Ice/ObjectFactoryF.h ../../../include/Ice/RouterF.h ../../../include/Ice/LocatorF.h ../../../include/Ice/PluginF.h ../../../include/Ice/ObjectFactory.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/Object.h ../../../include/Ice/IncomingAsyncF.h ../../../include/Ice/Outgoing.h ../../../include/Ice/BasicStream.h ../../../include/Ice/Buffer.h ../../../include/Ice/Protocol.h ../../../include/IceUtil/Unicode.h ../../../include/Ice/OutgoingAsync.h ../../../include/Ice/Incoming.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/ServantManagerF.h ../../../include/Ice/IncomingAsync.h ../../../include/Ice/Direct.h ../../../include/Ice/UserExceptionFactory.h ../../../include/Ice/FactoryTable.h ../../../include/Ice/FactoryTableDef.h ../../../include/IceUtil/StaticMutex.h ../../../include/Ice/UserExceptionFactoryF.h ../../../include/Ice/FacetMap.h ../../../include/Ice/Locator.h ../../../include/Ice/ProcessF.h ../../../include/Ice/ServantLocator.h ../../../include/Ice/Process.h ../../../include/Ice/Application.h ../../../include/Ice/Connection.h ../../../include/Ice/Functional.h ../../../include/IceUtil/Functional.h ../../../include/Ice/Stream.h TestI.h Test.h -Server$(OBJEXT): Server.cpp ../../../include/Ice/Ice.h ../../../include/Ice/GCRecMutex.h ../../../include/IceUtil/RecMutex.h ../../../include/IceUtil/Config.h ../../../include/IceUtil/Lock.h ../../../include/IceUtil/ThreadException.h ../../../include/IceUtil/Exception.h ../../../include/Ice/Config.h ../../../include/Ice/GCShared.h ../../../include/Ice/GCCountMap.h ../../../include/Ice/GC.h ../../../include/IceUtil/Thread.h ../../../include/IceUtil/Shared.h ../../../include/IceUtil/Handle.h ../../../include/IceUtil/Mutex.h ../../../include/IceUtil/Monitor.h ../../../include/IceUtil/Cond.h ../../../include/IceUtil/Time.h ../../../include/Ice/Initialize.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalObject.h ../../../include/Ice/UndefSysMacros.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/InstanceF.h ../../../include/Ice/LoggerF.h ../../../include/Ice/StreamF.h ../../../include/Ice/StatsF.h ../../../include/Ice/StringConverter.h ../../../include/Ice/BuiltinSequences.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/ConnectionIF.h ../../../include/Ice/EndpointIF.h ../../../include/Ice/Endpoint.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/OutgoingAsyncF.h ../../../include/Ice/Current.h ../../../include/Ice/ConnectionF.h ../../../include/Ice/Identity.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/LoggerUtil.h ../../../include/Ice/Stats.h ../../../include/Ice/Communicator.h ../../../include/Ice/ObjectFactoryF.h ../../../include/Ice/RouterF.h ../../../include/Ice/LocatorF.h ../../../include/Ice/PluginF.h ../../../include/Ice/ObjectFactory.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/Object.h ../../../include/Ice/IncomingAsyncF.h ../../../include/Ice/Outgoing.h ../../../include/Ice/BasicStream.h ../../../include/Ice/Buffer.h ../../../include/Ice/Protocol.h ../../../include/IceUtil/Unicode.h ../../../include/Ice/OutgoingAsync.h ../../../include/Ice/Incoming.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/ServantManagerF.h ../../../include/Ice/IncomingAsync.h ../../../include/Ice/Direct.h ../../../include/Ice/UserExceptionFactory.h ../../../include/Ice/FactoryTable.h ../../../include/Ice/FactoryTableDef.h ../../../include/IceUtil/StaticMutex.h ../../../include/Ice/UserExceptionFactoryF.h ../../../include/Ice/FacetMap.h ../../../include/Ice/Locator.h ../../../include/Ice/ProcessF.h ../../../include/Ice/ServantLocator.h ../../../include/Ice/Process.h ../../../include/Ice/Application.h ../../../include/Ice/Connection.h ../../../include/Ice/Functional.h ../../../include/IceUtil/Functional.h ../../../include/Ice/Stream.h TestI.h Test.h ../../include/TestCommon.h -TestI$(OBJEXT): TestI.cpp ../../../include/Ice/Ice.h ../../../include/Ice/GCRecMutex.h ../../../include/IceUtil/RecMutex.h ../../../include/IceUtil/Config.h ../../../include/IceUtil/Lock.h ../../../include/IceUtil/ThreadException.h ../../../include/IceUtil/Exception.h ../../../include/Ice/Config.h ../../../include/Ice/GCShared.h ../../../include/Ice/GCCountMap.h ../../../include/Ice/GC.h ../../../include/IceUtil/Thread.h ../../../include/IceUtil/Shared.h ../../../include/IceUtil/Handle.h ../../../include/IceUtil/Mutex.h ../../../include/IceUtil/Monitor.h ../../../include/IceUtil/Cond.h ../../../include/IceUtil/Time.h ../../../include/Ice/Initialize.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalObject.h ../../../include/Ice/UndefSysMacros.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/InstanceF.h ../../../include/Ice/LoggerF.h ../../../include/Ice/StreamF.h ../../../include/Ice/StatsF.h ../../../include/Ice/StringConverter.h ../../../include/Ice/BuiltinSequences.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/ConnectionIF.h ../../../include/Ice/EndpointIF.h ../../../include/Ice/Endpoint.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/OutgoingAsyncF.h ../../../include/Ice/Current.h ../../../include/Ice/ConnectionF.h ../../../include/Ice/Identity.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/LoggerUtil.h ../../../include/Ice/Stats.h ../../../include/Ice/Communicator.h ../../../include/Ice/ObjectFactoryF.h ../../../include/Ice/RouterF.h ../../../include/Ice/LocatorF.h ../../../include/Ice/PluginF.h ../../../include/Ice/ObjectFactory.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/Object.h ../../../include/Ice/IncomingAsyncF.h ../../../include/Ice/Outgoing.h ../../../include/Ice/BasicStream.h ../../../include/Ice/Buffer.h ../../../include/Ice/Protocol.h ../../../include/IceUtil/Unicode.h ../../../include/Ice/OutgoingAsync.h ../../../include/Ice/Incoming.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/ServantManagerF.h ../../../include/Ice/IncomingAsync.h ../../../include/Ice/Direct.h ../../../include/Ice/UserExceptionFactory.h ../../../include/Ice/FactoryTable.h ../../../include/Ice/FactoryTableDef.h ../../../include/IceUtil/StaticMutex.h ../../../include/Ice/UserExceptionFactoryF.h ../../../include/Ice/FacetMap.h ../../../include/Ice/Locator.h ../../../include/Ice/ProcessF.h ../../../include/Ice/ServantLocator.h ../../../include/Ice/Process.h ../../../include/Ice/Application.h ../../../include/Ice/Connection.h ../../../include/Ice/Functional.h ../../../include/IceUtil/Functional.h ../../../include/Ice/Stream.h TestI.h Test.h -Service$(OBJEXT): Service.cpp ../../../include/Ice/Ice.h ../../../include/Ice/GCRecMutex.h ../../../include/IceUtil/RecMutex.h ../../../include/IceUtil/Config.h ../../../include/IceUtil/Lock.h ../../../include/IceUtil/ThreadException.h ../../../include/IceUtil/Exception.h ../../../include/Ice/Config.h ../../../include/Ice/GCShared.h ../../../include/Ice/GCCountMap.h ../../../include/Ice/GC.h ../../../include/IceUtil/Thread.h ../../../include/IceUtil/Shared.h ../../../include/IceUtil/Handle.h ../../../include/IceUtil/Mutex.h ../../../include/IceUtil/Monitor.h ../../../include/IceUtil/Cond.h ../../../include/IceUtil/Time.h ../../../include/Ice/Initialize.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalObject.h ../../../include/Ice/UndefSysMacros.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/InstanceF.h ../../../include/Ice/LoggerF.h ../../../include/Ice/StreamF.h ../../../include/Ice/StatsF.h ../../../include/Ice/StringConverter.h ../../../include/Ice/BuiltinSequences.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/ConnectionIF.h ../../../include/Ice/EndpointIF.h ../../../include/Ice/Endpoint.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/OutgoingAsyncF.h ../../../include/Ice/Current.h ../../../include/Ice/ConnectionF.h ../../../include/Ice/Identity.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/LoggerUtil.h ../../../include/Ice/Stats.h ../../../include/Ice/Communicator.h ../../../include/Ice/ObjectFactoryF.h ../../../include/Ice/RouterF.h ../../../include/Ice/LocatorF.h ../../../include/Ice/PluginF.h ../../../include/Ice/ObjectFactory.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/Object.h ../../../include/Ice/IncomingAsyncF.h ../../../include/Ice/Outgoing.h ../../../include/Ice/BasicStream.h ../../../include/Ice/Buffer.h ../../../include/Ice/Protocol.h ../../../include/IceUtil/Unicode.h ../../../include/Ice/OutgoingAsync.h ../../../include/Ice/Incoming.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/ServantManagerF.h ../../../include/Ice/IncomingAsync.h ../../../include/Ice/Direct.h ../../../include/Ice/UserExceptionFactory.h ../../../include/Ice/FactoryTable.h ../../../include/Ice/FactoryTableDef.h ../../../include/IceUtil/StaticMutex.h ../../../include/Ice/UserExceptionFactoryF.h ../../../include/Ice/FacetMap.h ../../../include/Ice/Locator.h ../../../include/Ice/ProcessF.h ../../../include/Ice/ServantLocator.h ../../../include/Ice/Process.h ../../../include/Ice/Application.h ../../../include/Ice/Connection.h ../../../include/Ice/Functional.h ../../../include/IceUtil/Functional.h ../../../include/Ice/Stream.h ../../../include/IceBox/IceBox.h ../../../include/Ice/SliceChecksumDict.h TestI.h Test.h +Test$(OBJEXT): Test.cpp Test.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Handle.h ../../../include/IceUtil/Handle.h ../../../include/IceUtil/Exception.h ../../../include/IceUtil/Config.h ../../../include/Ice/Config.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ObjectF.h ../../../include/Ice/GCCountMap.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalObject.h ../../../include/IceUtil/Shared.h ../../../include/IceUtil/Mutex.h ../../../include/IceUtil/Lock.h ../../../include/IceUtil/ThreadException.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/ConnectionIF.h ../../../include/Ice/EndpointIF.h ../../../include/Ice/Endpoint.h ../../../include/Ice/UndefSysMacros.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/OutgoingAsyncF.h ../../../include/Ice/Current.h ../../../include/Ice/ConnectionF.h ../../../include/Ice/Identity.h ../../../include/Ice/StreamF.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/Object.h ../../../include/Ice/GCShared.h ../../../include/Ice/GCRecMutex.h ../../../include/IceUtil/RecMutex.h ../../../include/Ice/IncomingAsyncF.h ../../../include/Ice/Outgoing.h ../../../include/IceUtil/Monitor.h ../../../include/IceUtil/Cond.h ../../../include/IceUtil/Time.h ../../../include/Ice/BasicStream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/ObjectFactoryF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Protocol.h ../../../include/Ice/StringConverter.h ../../../include/IceUtil/Unicode.h ../../../include/Ice/Incoming.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/ServantManagerF.h ../../../include/Ice/Direct.h ../../../include/Ice/LocalException.h ../../../include/Ice/BuiltinSequences.h ../../../include/Ice/ObjectFactory.h ../../../include/IceUtil/Iterator.h ../../../include/IceUtil/ScopedArray.h +Client$(OBJEXT): Client.cpp ../../../include/Ice/Ice.h ../../../include/Ice/GCRecMutex.h ../../../include/IceUtil/RecMutex.h ../../../include/IceUtil/Config.h ../../../include/IceUtil/Lock.h ../../../include/IceUtil/ThreadException.h ../../../include/IceUtil/Exception.h ../../../include/Ice/Config.h ../../../include/Ice/GCShared.h ../../../include/Ice/GCCountMap.h ../../../include/Ice/GC.h ../../../include/IceUtil/Thread.h ../../../include/IceUtil/Shared.h ../../../include/IceUtil/Mutex.h ../../../include/IceUtil/Handle.h ../../../include/IceUtil/Monitor.h ../../../include/IceUtil/Cond.h ../../../include/IceUtil/Time.h ../../../include/Ice/Initialize.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalObject.h ../../../include/Ice/UndefSysMacros.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/InstanceF.h ../../../include/Ice/LoggerF.h ../../../include/Ice/StreamF.h ../../../include/Ice/StatsF.h ../../../include/Ice/StringConverter.h ../../../include/Ice/BuiltinSequences.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/ConnectionIF.h ../../../include/Ice/EndpointIF.h ../../../include/Ice/Endpoint.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/OutgoingAsyncF.h ../../../include/Ice/Current.h ../../../include/Ice/ConnectionF.h ../../../include/Ice/Identity.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/LoggerUtil.h ../../../include/Ice/Stats.h ../../../include/Ice/Communicator.h ../../../include/Ice/ObjectFactoryF.h ../../../include/Ice/RouterF.h ../../../include/Ice/LocatorF.h ../../../include/Ice/PluginF.h ../../../include/Ice/ObjectFactory.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/Object.h ../../../include/Ice/IncomingAsyncF.h ../../../include/Ice/Outgoing.h ../../../include/Ice/BasicStream.h ../../../include/Ice/Buffer.h ../../../include/Ice/Protocol.h ../../../include/IceUtil/Unicode.h ../../../include/Ice/OutgoingAsync.h ../../../include/Ice/Incoming.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/ServantManagerF.h ../../../include/Ice/IncomingAsync.h ../../../include/Ice/Direct.h ../../../include/Ice/UserExceptionFactory.h ../../../include/Ice/FactoryTable.h ../../../include/Ice/FactoryTableDef.h ../../../include/IceUtil/StaticMutex.h ../../../include/Ice/UserExceptionFactoryF.h ../../../include/Ice/FacetMap.h ../../../include/Ice/Locator.h ../../../include/Ice/ProcessF.h ../../../include/Ice/ServantLocator.h ../../../include/Ice/Process.h ../../../include/Ice/Application.h ../../../include/Ice/Connection.h ../../../include/Ice/Functional.h ../../../include/IceUtil/Functional.h ../../../include/Ice/Stream.h ../../include/TestCommon.h Test.h +AllTests$(OBJEXT): AllTests.cpp ../../../include/Ice/Ice.h ../../../include/Ice/GCRecMutex.h ../../../include/IceUtil/RecMutex.h ../../../include/IceUtil/Config.h ../../../include/IceUtil/Lock.h ../../../include/IceUtil/ThreadException.h ../../../include/IceUtil/Exception.h ../../../include/Ice/Config.h ../../../include/Ice/GCShared.h ../../../include/Ice/GCCountMap.h ../../../include/Ice/GC.h ../../../include/IceUtil/Thread.h ../../../include/IceUtil/Shared.h ../../../include/IceUtil/Mutex.h ../../../include/IceUtil/Handle.h ../../../include/IceUtil/Monitor.h ../../../include/IceUtil/Cond.h ../../../include/IceUtil/Time.h ../../../include/Ice/Initialize.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalObject.h ../../../include/Ice/UndefSysMacros.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/InstanceF.h ../../../include/Ice/LoggerF.h ../../../include/Ice/StreamF.h ../../../include/Ice/StatsF.h ../../../include/Ice/StringConverter.h ../../../include/Ice/BuiltinSequences.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/ConnectionIF.h ../../../include/Ice/EndpointIF.h ../../../include/Ice/Endpoint.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/OutgoingAsyncF.h ../../../include/Ice/Current.h ../../../include/Ice/ConnectionF.h ../../../include/Ice/Identity.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/LoggerUtil.h ../../../include/Ice/Stats.h ../../../include/Ice/Communicator.h ../../../include/Ice/ObjectFactoryF.h ../../../include/Ice/RouterF.h ../../../include/Ice/LocatorF.h ../../../include/Ice/PluginF.h ../../../include/Ice/ObjectFactory.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/Object.h ../../../include/Ice/IncomingAsyncF.h ../../../include/Ice/Outgoing.h ../../../include/Ice/BasicStream.h ../../../include/Ice/Buffer.h ../../../include/Ice/Protocol.h ../../../include/IceUtil/Unicode.h ../../../include/Ice/OutgoingAsync.h ../../../include/Ice/Incoming.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/ServantManagerF.h ../../../include/Ice/IncomingAsync.h ../../../include/Ice/Direct.h ../../../include/Ice/UserExceptionFactory.h ../../../include/Ice/FactoryTable.h ../../../include/Ice/FactoryTableDef.h ../../../include/IceUtil/StaticMutex.h ../../../include/Ice/UserExceptionFactoryF.h ../../../include/Ice/FacetMap.h ../../../include/Ice/Locator.h ../../../include/Ice/ProcessF.h ../../../include/Ice/ServantLocator.h ../../../include/Ice/Process.h ../../../include/Ice/Application.h ../../../include/Ice/Connection.h ../../../include/Ice/Functional.h ../../../include/IceUtil/Functional.h ../../../include/Ice/Stream.h ../../../include/Ice/IdentityUtil.h ../../../include/IceGrid/Query.h ../../../include/IceGrid/Exception.h ../../../include/IceGrid/Registry.h ../../../include/IceGrid/Session.h ../../../include/Glacier2/Session.h ../../../include/Glacier2/SSLInfo.h ../../../include/IceGrid/Admin.h ../../../include/Ice/SliceChecksumDict.h ../../../include/IceGrid/Descriptor.h ../../include/TestCommon.h Test.h +TestI$(OBJEXT): TestI.cpp ../../../include/Ice/Ice.h ../../../include/Ice/GCRecMutex.h ../../../include/IceUtil/RecMutex.h ../../../include/IceUtil/Config.h ../../../include/IceUtil/Lock.h ../../../include/IceUtil/ThreadException.h ../../../include/IceUtil/Exception.h ../../../include/Ice/Config.h ../../../include/Ice/GCShared.h ../../../include/Ice/GCCountMap.h ../../../include/Ice/GC.h ../../../include/IceUtil/Thread.h ../../../include/IceUtil/Shared.h ../../../include/IceUtil/Mutex.h ../../../include/IceUtil/Handle.h ../../../include/IceUtil/Monitor.h ../../../include/IceUtil/Cond.h ../../../include/IceUtil/Time.h ../../../include/Ice/Initialize.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalObject.h ../../../include/Ice/UndefSysMacros.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/InstanceF.h ../../../include/Ice/LoggerF.h ../../../include/Ice/StreamF.h ../../../include/Ice/StatsF.h ../../../include/Ice/StringConverter.h ../../../include/Ice/BuiltinSequences.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/ConnectionIF.h ../../../include/Ice/EndpointIF.h ../../../include/Ice/Endpoint.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/OutgoingAsyncF.h ../../../include/Ice/Current.h ../../../include/Ice/ConnectionF.h ../../../include/Ice/Identity.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/LoggerUtil.h ../../../include/Ice/Stats.h ../../../include/Ice/Communicator.h ../../../include/Ice/ObjectFactoryF.h ../../../include/Ice/RouterF.h ../../../include/Ice/LocatorF.h ../../../include/Ice/PluginF.h ../../../include/Ice/ObjectFactory.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/Object.h ../../../include/Ice/IncomingAsyncF.h ../../../include/Ice/Outgoing.h ../../../include/Ice/BasicStream.h ../../../include/Ice/Buffer.h ../../../include/Ice/Protocol.h ../../../include/IceUtil/Unicode.h ../../../include/Ice/OutgoingAsync.h ../../../include/Ice/Incoming.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/ServantManagerF.h ../../../include/Ice/IncomingAsync.h ../../../include/Ice/Direct.h ../../../include/Ice/UserExceptionFactory.h ../../../include/Ice/FactoryTable.h ../../../include/Ice/FactoryTableDef.h ../../../include/IceUtil/StaticMutex.h ../../../include/Ice/UserExceptionFactoryF.h ../../../include/Ice/FacetMap.h ../../../include/Ice/Locator.h ../../../include/Ice/ProcessF.h ../../../include/Ice/ServantLocator.h ../../../include/Ice/Process.h ../../../include/Ice/Application.h ../../../include/Ice/Connection.h ../../../include/Ice/Functional.h ../../../include/IceUtil/Functional.h ../../../include/Ice/Stream.h TestI.h Test.h +Server$(OBJEXT): Server.cpp ../../../include/Ice/Ice.h ../../../include/Ice/GCRecMutex.h ../../../include/IceUtil/RecMutex.h ../../../include/IceUtil/Config.h ../../../include/IceUtil/Lock.h ../../../include/IceUtil/ThreadException.h ../../../include/IceUtil/Exception.h ../../../include/Ice/Config.h ../../../include/Ice/GCShared.h ../../../include/Ice/GCCountMap.h ../../../include/Ice/GC.h ../../../include/IceUtil/Thread.h ../../../include/IceUtil/Shared.h ../../../include/IceUtil/Mutex.h ../../../include/IceUtil/Handle.h ../../../include/IceUtil/Monitor.h ../../../include/IceUtil/Cond.h ../../../include/IceUtil/Time.h ../../../include/Ice/Initialize.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalObject.h ../../../include/Ice/UndefSysMacros.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/InstanceF.h ../../../include/Ice/LoggerF.h ../../../include/Ice/StreamF.h ../../../include/Ice/StatsF.h ../../../include/Ice/StringConverter.h ../../../include/Ice/BuiltinSequences.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/ConnectionIF.h ../../../include/Ice/EndpointIF.h ../../../include/Ice/Endpoint.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/OutgoingAsyncF.h ../../../include/Ice/Current.h ../../../include/Ice/ConnectionF.h ../../../include/Ice/Identity.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/LoggerUtil.h ../../../include/Ice/Stats.h ../../../include/Ice/Communicator.h ../../../include/Ice/ObjectFactoryF.h ../../../include/Ice/RouterF.h ../../../include/Ice/LocatorF.h ../../../include/Ice/PluginF.h ../../../include/Ice/ObjectFactory.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/Object.h ../../../include/Ice/IncomingAsyncF.h ../../../include/Ice/Outgoing.h ../../../include/Ice/BasicStream.h ../../../include/Ice/Buffer.h ../../../include/Ice/Protocol.h ../../../include/IceUtil/Unicode.h ../../../include/Ice/OutgoingAsync.h ../../../include/Ice/Incoming.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/ServantManagerF.h ../../../include/Ice/IncomingAsync.h ../../../include/Ice/Direct.h ../../../include/Ice/UserExceptionFactory.h ../../../include/Ice/FactoryTable.h ../../../include/Ice/FactoryTableDef.h ../../../include/IceUtil/StaticMutex.h ../../../include/Ice/UserExceptionFactoryF.h ../../../include/Ice/FacetMap.h ../../../include/Ice/Locator.h ../../../include/Ice/ProcessF.h ../../../include/Ice/ServantLocator.h ../../../include/Ice/Process.h ../../../include/Ice/Application.h ../../../include/Ice/Connection.h ../../../include/Ice/Functional.h ../../../include/IceUtil/Functional.h ../../../include/Ice/Stream.h TestI.h Test.h ../../include/TestCommon.h Test.cpp: Test.ice Test.ice: $(SLICE2CPP) $(SLICEPARSERLIB) diff --git a/cpp/test/IceGrid/replication/AllTests.cpp b/cpp/test/IceGrid/replication/AllTests.cpp index d949c81ced4..759a9170276 100644 --- a/cpp/test/IceGrid/replication/AllTests.cpp +++ b/cpp/test/IceGrid/replication/AllTests.cpp @@ -10,6 +10,7 @@ #include <Ice/Ice.h> #include <Ice/BuiltinSequences.h> #include <Ice/IdentityUtil.h> +#include <Ice/Locator.h> #include <IceGrid/Query.h> #include <IceGrid/Registry.h> #include <IceGrid/Admin.h> @@ -67,17 +68,48 @@ private: const IceUtil::Time _timeout; bool _destroy; }; - typedef IceUtil::Handle<SessionKeepAliveThread> SessionKeepAliveThreadPtr; void -instantiateServer(const AdminPrx& admin, const string& templ, const string& node, const map<string, string>& params) +waitForRegistryState(const IceGrid::AdminPrx& admin, const std::string& registry, bool up) +{ + int nRetry = 0; + while(nRetry < 15) + { + try + { + if(admin->pingRegistry(registry) && up) // Wait for the registry to be removed. + { + return; + } + } + catch(const RegistryNotExistException&) + { + if(!up) + { + return; + } + } + + IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(500)); + ++nRetry; + } + if(admin->pingRegistry(registry) != up) + { + cerr << "registry state change timed out:" << endl; + cerr << "registry: " << registry << endl; + cerr << "state: " << up << endl; + } +} + +void +instantiateServer(const AdminPrx& admin, const string& templ, const map<string, string>& params) { ServerInstanceDescriptor desc; desc._cpp_template = templ; desc.parameterValues = params; NodeUpdateDescriptor nodeUpdate; - nodeUpdate.name = node; + nodeUpdate.name = "localnode"; nodeUpdate.serverInstances.push_back(desc); ApplicationUpdateDescriptor update; update.name = "Test"; @@ -129,284 +161,458 @@ removeServer(const AdminPrx& admin, const string& id) } } +bool +waitAndPing(const Ice::ObjectPrx& obj) +{ + int nRetry = 0; + while(nRetry < 20) + { + try + { + obj->ice_ping(); + return true; + } + catch(const Ice::LocalException&) + { + IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(500)); + ++nRetry; + } + } + return false; +} + +AdminPrx +createAdminSession(const Ice::LocatorPrx& locator, const string& replica) +{ + test(waitAndPing(locator)); + + string registryStr("TestIceGrid/Registry"); + if(!replica.empty()) + { + registryStr += "-" + replica; + } + Ice::ObjectPrx obj = locator->ice_getCommunicator()->stringToProxy(registryStr)->ice_locator(locator); + RegistryPrx registry = RegistryPrx::checkedCast(obj); + test(registry); + + AdminSessionPrx session = AdminSessionPrx::checkedCast(registry->createAdminSession("foo", "bar")); + test(session); + return session->getAdmin(); +} + void allTests(const Ice::CommunicatorPtr& comm) { RegistryPrx registry = IceGrid::RegistryPrx::checkedCast(comm->stringToProxy("IceGrid/Registry")); test(registry); AdminSessionPrx session = registry->createAdminSession("foo", "bar"); - session->startUpdate(); - SessionKeepAliveThreadPtr keepAlive = new SessionKeepAliveThread(session, registry->getSessionTimeout()/2); + SessionKeepAliveThreadPtr keepAlive = new SessionKeepAliveThread(session, registry->getSessionTimeout() / 2); keepAlive->start(); AdminPrx admin = session->getAdmin(); test(admin); - set<string> serverReplicaIds; - serverReplicaIds.insert("Server1.ReplicatedAdapter"); - serverReplicaIds.insert("Server2.ReplicatedAdapter"); - serverReplicaIds.insert("Server3.ReplicatedAdapter"); - set<string> svcReplicaIds; - svcReplicaIds.insert("IceBox1.Service1.Service1"); - svcReplicaIds.insert("IceBox1.Service2.Service2"); - svcReplicaIds.insert("IceBox1.Service3.Service3"); + map<string, string> params; + + params.clear(); + params["id"] = "Master"; + params["port"] = "12050"; + instantiateServer(admin, "IceGridRegistry", params); + + params.clear(); + params["id"] = "Slave1"; + params["port"] = "12051"; + instantiateServer(admin, "IceGridRegistry", params); + + params.clear(); + params["id"] = "Slave2"; + params["port"] = "12052"; + instantiateServer(admin, "IceGridRegistry", params); + + Ice::LocatorPrx masterLocator = + Ice::LocatorPrx::uncheckedCast(comm->stringToProxy("TestIceGrid/Locator:default -p 12050")); + Ice::LocatorPrx slave1Locator = + Ice::LocatorPrx::uncheckedCast(comm->stringToProxy("TestIceGrid/Locator:default -p 12051")); + Ice::LocatorPrx slave2Locator = + Ice::LocatorPrx::uncheckedCast(comm->stringToProxy("TestIceGrid/Locator:default -p 12052")); + + AdminPrx masterAdmin, slave1Admin, slave2Admin; + + admin->startServer("Master"); + masterAdmin = createAdminSession(masterLocator, ""); + + admin->startServer("Slave1"); + slave1Admin = createAdminSession(slave1Locator, "Slave1"); + + // + // Test replication and well-known objects: + // + // - Locator interface + // - Query interface + // + // - Registry object + // - RegistryUserAccountMapper + // - SessionManager/SSLSessionManager + // - AdminSessionManager/AdminSSLSessionManager + // + cout << "testing replicated locator and query interface... " << flush; + { + Ice::EndpointSeq endpoints; + ObjectInfo info; + + info = masterAdmin->getObjectInfo(comm->stringToIdentity("TestIceGrid/Locator")); + ObjectInfo info1 = slave1Admin->getObjectInfo(comm->stringToIdentity("TestIceGrid/Locator")); + test(slave1Admin->getObjectInfo(comm->stringToIdentity("TestIceGrid/Locator")) == info); + test(info.type == Ice::Locator::ice_staticId()); + endpoints = info.proxy->ice_getEndpoints(); + test(endpoints.size() == 2); + test(endpoints[0]->toString() == masterLocator->ice_getEndpoints()[0]->toString()); + test(endpoints[1]->toString() == slave1Locator->ice_getEndpoints()[0]->toString()); + + info = masterAdmin->getObjectInfo(comm->stringToIdentity("TestIceGrid/Query")); + test(slave1Admin->getObjectInfo(comm->stringToIdentity("TestIceGrid/Query")) == info); + test(info.type == IceGrid::Query::ice_staticId()); + endpoints = info.proxy->ice_getEndpoints(); + test(endpoints.size() == 2); + test(endpoints[0]->toString() == masterLocator->ice_getEndpoints()[0]->toString()); + test(endpoints[1]->toString() == slave1Locator->ice_getEndpoints()[0]->toString()); + + admin->startServer("Slave2"); + slave2Admin = createAdminSession(slave2Locator, "Slave2"); + + info = masterAdmin->getObjectInfo(comm->stringToIdentity("TestIceGrid/Locator")); + test(slave1Admin->getObjectInfo(comm->stringToIdentity("TestIceGrid/Locator")) == info); + test(slave2Admin->getObjectInfo(comm->stringToIdentity("TestIceGrid/Locator")) == info); + test(info.type == Ice::Locator::ice_staticId()); + endpoints = info.proxy->ice_getEndpoints(); + test(endpoints.size() == 3); + test(endpoints[0]->toString() == masterLocator->ice_getEndpoints()[0]->toString()); + test(endpoints[1]->toString() == slave1Locator->ice_getEndpoints()[0]->toString()); + test(endpoints[2]->toString() == slave2Locator->ice_getEndpoints()[0]->toString()); + + info = masterAdmin->getObjectInfo(comm->stringToIdentity("TestIceGrid/Query")); + test(slave1Admin->getObjectInfo(comm->stringToIdentity("TestIceGrid/Query")) == info); + test(slave2Admin->getObjectInfo(comm->stringToIdentity("TestIceGrid/Query")) == info); + test(info.type == IceGrid::Query::ice_staticId()); + endpoints = info.proxy->ice_getEndpoints(); + test(endpoints.size() == 3); + test(endpoints[0]->toString() == masterLocator->ice_getEndpoints()[0]->toString()); + test(endpoints[1]->toString() == slave1Locator->ice_getEndpoints()[0]->toString()); + test(endpoints[2]->toString() == slave2Locator->ice_getEndpoints()[0]->toString()); + + slave2Admin->shutdown(); + waitForRegistryState(admin, "Slave2", false); + + info = masterAdmin->getObjectInfo(comm->stringToIdentity("TestIceGrid/Locator")); + test(slave1Admin->getObjectInfo(comm->stringToIdentity("TestIceGrid/Locator")) == info); + test(info.type == Ice::Locator::ice_staticId()); + endpoints = info.proxy->ice_getEndpoints(); + test(endpoints.size() == 2); + test(endpoints[0]->toString() == masterLocator->ice_getEndpoints()[0]->toString()); + test(endpoints[1]->toString() == slave1Locator->ice_getEndpoints()[0]->toString()); + + info = masterAdmin->getObjectInfo(comm->stringToIdentity("TestIceGrid/Query")); + test(slave1Admin->getObjectInfo(comm->stringToIdentity("TestIceGrid/Query")) == info); + test(info.type == IceGrid::Query::ice_staticId()); + endpoints = info.proxy->ice_getEndpoints(); + test(endpoints.size() == 2); + test(endpoints[0]->toString() == masterLocator->ice_getEndpoints()[0]->toString()); + test(endpoints[1]->toString() == slave1Locator->ice_getEndpoints()[0]->toString()); + } + cout << "ok" << endl; + + cout << "testing replicated query interface... " << flush; + { + } + cout << "ok" << endl; - cout << "testing replication without load balancing... " << flush; + cout << "testing well-known IceGrid objects... " << flush; { - map<string, string> params; - params["replicaGroup"] = "Default"; - params["id"] = "Server1"; - instantiateServer(admin, "Server", "localnode", params); - params["id"] = "Server2"; - instantiateServer(admin, "Server", "localnode", params); - params["id"] = "Server3"; - instantiateServer(admin, "Server", "localnode", params); - set<string> replicaIds = serverReplicaIds; - TestIntfPrx obj = TestIntfPrx::uncheckedCast(comm->stringToProxy("Default")); + } + cout << "ok" << endl; + + // + // Registry update test: + // + // - start master + // - start slave1: keep slave1 up for each update + // - start slave2: shutdown slave2 for each update + // - ensure updates are correctly replicated + // - updates to test: application/adapter/object + // + cout << "testing registry updates... " << flush; + { + ApplicationDescriptor app; + app.name = "TestApp"; + app.description = "added application"; + + AdapterInfo adpt; + adpt.id = "TestAdpt"; + adpt.proxy = comm->stringToProxy("dummy:tcp -p 12345 -h 127.0.0.1"); + + ObjectInfo obj; + obj.proxy = comm->stringToProxy("dummy:tcp -p 12345 -h 127.0.0.1"); + obj.type = "::Hello"; + + // + // We use the locator registry from Slave1 to ensure that the + // forwarding to the master work (the slave locator registry + // forwards everything to the master). + // + Ice::LocatorRegistryPrx locatorRegistry = slave1Locator->getRegistry(); + + // + // Test addition of application, adapter, object. + // + try { - test(replicaIds.erase(obj->getReplicaIdAndShutdown()) == 1); - test(replicaIds.erase(obj->getReplicaIdAndShutdown()) == 1); - test(replicaIds.erase(obj->getReplicaIdAndShutdown()) == 1); + slave1Admin->addApplication(app); + test(false); } - catch(const Ice::LocalException& ex) + catch(const DeploymentException&) { - cerr << ex << endl; - test(false); + // Slave can't modify the database. } - removeServer(admin, "Server1"); - removeServer(admin, "Server2"); - removeServer(admin, "Server3"); - } - { - map<string, string> params; - params["replicaGroup"] = "Default"; - params["id"] = "IceBox1"; - instantiateServer(admin, "IceBox", "localnode", params); - set<string> replicaIds = svcReplicaIds; - TestIntfPrx obj = TestIntfPrx::uncheckedCast(comm->stringToProxy("Default")); + masterAdmin->addApplication(app); + + locatorRegistry->setAdapterDirectProxy(adpt.id, adpt.proxy); + try { - test(replicaIds.erase(obj->getReplicaIdAndShutdown()) == 1); - test(replicaIds.erase(obj->getReplicaIdAndShutdown()) == 1); - test(replicaIds.erase(obj->getReplicaIdAndShutdown()) == 1); + slave1Admin->addObjectWithType(obj.proxy, obj.type); + test(false); } - catch(const Ice::LocalException& ex) + catch(const DeploymentException&) { - cerr << ex << endl; - test(false); + // Slave can't modify the database } - removeServer(admin, "IceBox1"); - } - cout << "ok" << endl; + masterAdmin->addObjectWithType(obj.proxy, obj.type); - cout << "testing replication with round-robin load balancing... " << flush; - { - map<string, string> params; - params["replicaGroup"] = "RoundRobin"; - params["id"] = "Server1"; - instantiateServer(admin, "Server", "localnode", params); - params["id"] = "Server2"; - instantiateServer(admin, "Server", "localnode", params); - params["id"] = "Server3"; - instantiateServer(admin, "Server", "localnode", params); - TestIntfPrx obj = TestIntfPrx::uncheckedCast(comm->stringToProxy("RoundRobin")); + admin->startServer("Slave2"); + slave2Admin = createAdminSession(slave2Locator, "Slave2"); + + test(masterAdmin->getApplicationInfo("TestApp").descriptor.description == "added application"); + test(slave1Admin->getApplicationInfo("TestApp").descriptor.description == "added application"); + test(slave2Admin->getApplicationInfo("TestApp").descriptor.description == "added application"); + + test(masterAdmin->getAdapterInfo("TestAdpt")[0] == adpt); + test(slave1Admin->getAdapterInfo("TestAdpt")[0] == adpt); + test(slave2Admin->getAdapterInfo("TestAdpt")[0] == adpt); + + test(masterAdmin->getObjectInfo(obj.proxy->ice_getIdentity()) == obj); + test(slave1Admin->getObjectInfo(obj.proxy->ice_getIdentity()) == obj); + test(slave2Admin->getObjectInfo(obj.proxy->ice_getIdentity()) == obj); + + slave2Admin->shutdown(); + waitForRegistryState(admin, "Slave2", false); + + // + // Test sync of application. + // + + app.description = "updated1 application"; try { - test(obj->getReplicaIdAndShutdown() == "Server1.ReplicatedAdapter"); - test(obj->getReplicaIdAndShutdown() == "Server2.ReplicatedAdapter"); - test(obj->getReplicaIdAndShutdown() == "Server3.ReplicatedAdapter"); + slave1Admin->syncApplication(app); + test(false); } - catch(const Ice::LocalException& ex) + catch(const DeploymentException&) { - cerr << ex << endl; + // Slave can't modify the database. + } + masterAdmin->syncApplication(app); + + admin->startServer("Slave2"); + slave2Admin = createAdminSession(slave2Locator, "Slave2"); + test(masterAdmin->getApplicationInfo("TestApp").descriptor.description == "updated1 application"); + test(slave1Admin->getApplicationInfo("TestApp").descriptor.description == "updated1 application"); + test(slave2Admin->getApplicationInfo("TestApp").descriptor.description == "updated1 application"); + slave2Admin->shutdown(); + waitForRegistryState(admin, "Slave2", false); + + // + // Test update of application, adapter, object. + // + + ApplicationUpdateDescriptor appUpdate; + appUpdate.name = "TestApp"; + appUpdate.description = new BoxedString("updated2 application"); + try + { + slave1Admin->updateApplication(appUpdate); test(false); } - removeServer(admin, "Server1"); - removeServer(admin, "Server2"); - removeServer(admin, "Server3"); - } - { - map<string, string> params; - params["replicaGroup"] = "RoundRobin"; - params["id"] = "IceBox1"; - instantiateServer(admin, "IceBox", "localnode", params); - TestIntfPrx obj = TestIntfPrx::uncheckedCast(comm->stringToProxy("RoundRobin")); + catch(const DeploymentException&) + { + // Slave can't modify the database. + } + masterAdmin->updateApplication(appUpdate); + + adpt.replicaGroupId = "TestReplicaGroup"; + locatorRegistry->setReplicatedAdapterDirectProxy(adpt.id, adpt.replicaGroupId, adpt.proxy); + + obj.proxy = comm->stringToProxy("dummy:tcp -p 12346 -h 127.0.0.1"); try { - test(obj->getReplicaIdAndShutdown() == "IceBox1.Service1.Service1"); - test(obj->getReplicaIdAndShutdown() == "IceBox1.Service2.Service2"); - test(obj->getReplicaIdAndShutdown() == "IceBox1.Service3.Service3"); + slave1Admin->updateObject(obj.proxy); + test(false); } - catch(const Ice::LocalException& ex) + catch(const DeploymentException&) { - cerr << ex << endl; + // Slave can't modify the database + } + masterAdmin->updateObject(obj.proxy); + + admin->startServer("Slave2"); + slave2Admin = createAdminSession(slave2Locator, "Slave2"); + + test(masterAdmin->getApplicationInfo("TestApp").descriptor.description == "updated2 application"); + test(slave1Admin->getApplicationInfo("TestApp").descriptor.description == "updated2 application"); + test(slave2Admin->getApplicationInfo("TestApp").descriptor.description == "updated2 application"); + + test(masterAdmin->getAdapterInfo("TestAdpt")[0] == adpt); + test(slave1Admin->getAdapterInfo("TestAdpt")[0] == adpt); + test(slave2Admin->getAdapterInfo("TestAdpt")[0] == adpt); + + test(masterAdmin->getObjectInfo(obj.proxy->ice_getIdentity()) == obj); + test(slave1Admin->getObjectInfo(obj.proxy->ice_getIdentity()) == obj); + test(slave2Admin->getObjectInfo(obj.proxy->ice_getIdentity()) == obj); + + slave2Admin->shutdown(); + waitForRegistryState(admin, "Slave2", false); + + // + // Test removal of application, adapter and object. + + try + { + slave1Admin->removeApplication("TestApp"); test(false); } - removeServer(admin, "IceBox1"); - } - cout << "ok" << endl; + catch(const DeploymentException&) + { + // Slave can't modify the database. + } + masterAdmin->removeApplication("TestApp"); - cout << "testing replication with random load balancing... " << flush; - { - map<string, string> params; - params["replicaGroup"] = "Random"; - params["id"] = "Server1"; - instantiateServer(admin, "Server", "localnode", params); - params["id"] = "Server2"; - instantiateServer(admin, "Server", "localnode", params); - params["id"] = "Server3"; - instantiateServer(admin, "Server", "localnode", params); - TestIntfPrx obj = TestIntfPrx::uncheckedCast(comm->stringToProxy("Random")); - set<string> replicaIds = serverReplicaIds; - while(!replicaIds.empty()) - { - try - { - replicaIds.erase(obj->getReplicaIdAndShutdown()); - } - catch(const Ice::LocalException& ex) - { - cerr << ex << endl; - test(false); - } + try + { + slave1Admin->removeAdapter("TestAdpt"); + test(false); } - removeServer(admin, "Server1"); - removeServer(admin, "Server2"); - removeServer(admin, "Server3"); - } - { - map<string, string> params; - params["replicaGroup"] = "Random"; - params["id"] = "IceBox1"; - instantiateServer(admin, "IceBox", "localnode", params); - TestIntfPrx obj = TestIntfPrx::uncheckedCast(comm->stringToProxy("Random")); - set<string> replicaIds = svcReplicaIds; - while(!replicaIds.empty()) - { - try - { - replicaIds.erase(obj->getReplicaIdAndShutdown()); - } - catch(const Ice::ConnectionRefusedException&) - { - } - catch(const Ice::LocalException& ex) - { - cerr << ex << endl; - test(false); - } + catch(const DeploymentException&) + { + // Slave can't modify the database. } - removeServer(admin, "IceBox1"); - } - cout << "ok" << endl; + masterAdmin->removeAdapter("TestAdpt"); + try + { + slave1Admin->removeObject(obj.proxy->ice_getIdentity()); + } + catch(const DeploymentException&) + { + // Slave can't modify the database. + } + masterAdmin->removeObject(obj.proxy->ice_getIdentity()); - cout << "testing replication with adaptive load balancing... " << flush; - { - map<string, string> params; - params["replicaGroup"] = "Adaptive"; - params["id"] = "Server1"; - instantiateServer(admin, "Server", "localnode", params); - params["id"] = "Server2"; - instantiateServer(admin, "Server", "localnode", params); - params["id"] = "Server3"; - instantiateServer(admin, "Server", "localnode", params); - TestIntfPrx obj = TestIntfPrx::uncheckedCast(comm->stringToProxy("Adaptive")); - set<string> replicaIds = serverReplicaIds; - while(!replicaIds.empty()) - { - try - { - replicaIds.erase(obj->getReplicaIdAndShutdown()); - } - catch(const Ice::LocalException& ex) - { - cerr << ex << endl; - test(false); - } + admin->startServer("Slave2"); + slave2Admin = createAdminSession(slave2Locator, "Slave2"); + try + { + masterAdmin->getApplicationInfo("TestApp"); + test(false); } - removeServer(admin, "Server1"); - removeServer(admin, "Server2"); - removeServer(admin, "Server3"); - } - { - map<string, string> params; - params["replicaGroup"] = "Adaptive"; - params["id"] = "IceBox1"; - instantiateServer(admin, "IceBox", "localnode", params); - TestIntfPrx obj = TestIntfPrx::uncheckedCast(comm->stringToProxy("Adaptive")); - set<string> replicaIds = svcReplicaIds; - while(!replicaIds.empty()) - { - try - { - replicaIds.erase(obj->getReplicaIdAndShutdown()); - } - catch(const Ice::ConnectionRefusedException&) - { - } - catch(const Ice::LocalException& ex) - { - cerr << ex << endl; - test(false); - } + catch(const ApplicationNotExistException&) + { + } + try + { + slave1Admin->getApplicationInfo("TestApp"); + test(false); + } + catch(const ApplicationNotExistException&) + { + } + try + { + slave2Admin->getApplicationInfo("TestApp"); + test(false); + } + catch(const ApplicationNotExistException&) + { + } + try + { + masterAdmin->getAdapterInfo("TestAdpt"); + test(false); + } + catch(const AdapterNotExistException&) + { + } + try + { + slave1Admin->getAdapterInfo("TestAdpt"); + test(false); + } + catch(const AdapterNotExistException&) + { + } + try + { + slave2Admin->getAdapterInfo("TestAdpt"); + test(false); + } + catch(const AdapterNotExistException&) + { + } + try + { + masterAdmin->getObjectInfo(obj.proxy->ice_getIdentity()); + test(false); + } + catch(const ObjectNotRegisteredException&) + { + } + try + { + slave1Admin->getObjectInfo(obj.proxy->ice_getIdentity()); + test(false); + } + catch(const ObjectNotRegisteredException&) + { + } + try + { + slave2Admin->getObjectInfo(obj.proxy->ice_getIdentity()); + test(false); + } + catch(const ObjectNotRegisteredException&) + { } - removeServer(admin, "IceBox1"); - } - cout << "ok" << endl; - cout << "testing replication with inactive nodes... " << flush; - { - map<string, string> params; - - params["replicaGroup"] = "Random"; - params["id"] = "Server1"; - instantiateServer(admin, "Server", "inactivenode", params); - params["id"] = "Server2"; - instantiateServer(admin, "Server", "localnode", params); - TestIntfPrx obj = TestIntfPrx::uncheckedCast(comm->stringToProxy("Random")); - test(obj->getReplicaIdAndShutdown() == "Server2.ReplicatedAdapter"); - removeServer(admin, "Server1"); - removeServer(admin, "Server2"); - - params["replicaGroup"] = "RoundRobin"; - params["id"] = "Server1"; - instantiateServer(admin, "Server", "inactivenode", params); - params["id"] = "Server2"; - instantiateServer(admin, "Server", "localnode", params); - obj = TestIntfPrx::uncheckedCast(comm->stringToProxy("RoundRobin")); - test(obj->getReplicaIdAndShutdown() == "Server2.ReplicatedAdapter"); - removeServer(admin, "Server1"); - removeServer(admin, "Server2"); - - params["replicaGroup"] = "Adaptive"; - params["id"] = "Server1"; - instantiateServer(admin, "Server", "inactivenode", params); - params["id"] = "Server2"; - instantiateServer(admin, "Server", "localnode", params); - obj = TestIntfPrx::uncheckedCast(comm->stringToProxy("Adaptive")); - test(obj->getReplicaIdAndShutdown() == "Server2.ReplicatedAdapter"); - removeServer(admin, "Server1"); - removeServer(admin, "Server2"); - - params["replicaGroup"] = "Random"; - params["id"] = "IceBox1"; - instantiateServer(admin, "IceBox", "localnode", params); - params["id"] = "Server1"; - instantiateServer(admin, "Server", "inactivenode", params); - obj = TestIntfPrx::uncheckedCast(comm->stringToProxy("Random")); - test(svcReplicaIds.find(obj->getReplicaIdAndShutdown()) != svcReplicaIds.end()); - removeServer(admin, "IceBox1"); - removeServer(admin, "Server1"); - }; + slave2Admin->shutdown(); + waitForRegistryState(admin, "Slave2", false); + } cout << "ok" << endl; - session->finishUpdate(); - - keepAlive->destroy(); - keepAlive->getThreadControl().join(); - keepAlive = 0; + removeServer(admin, "Slave2"); + slave1Admin->shutdown(); + removeServer(admin, "Slave1"); + masterAdmin->shutdown(); + removeServer(admin, "Master"); - session->destroy(); + // + // Test node session establishment. + // + // - start master, start slave1, start node, start slave2 + // - shutdown slave1, start slave1 -> node should re-connect + // - shutdown master + // - shutdown slave2, start slave2 -> node should re-connect + // - start slave3 -> node can't connect to it + // - shutdown slave1 + // - start master -> node connects to master, slave3 + // - start slave1 -> node connects to slave1 + // } diff --git a/cpp/test/IceGrid/replication/Makefile b/cpp/test/IceGrid/replication/Makefile index ec8fba9506a..0b60c215fa3 100644 --- a/cpp/test/IceGrid/replication/Makefile +++ b/cpp/test/IceGrid/replication/Makefile @@ -12,10 +12,7 @@ top_srcdir = ../../.. CLIENT = client SERVER = server -SVCFILENAME = $(call mklibfilename,TestService) -SVCSONAME = $(call mksoname,TestService) - -TARGETS = $(CLIENT) $(SERVER) $(SVCFILENAME) +TARGETS = $(CLIENT) $(SERVER) OBJS = Test.o @@ -25,13 +22,9 @@ COBJS = Client.o \ SOBJS = TestI.o \ Server.o -SERVICE_OBJS = TestI.o \ - Service.o - SRCS = $(OBJS:.o=.cpp) \ $(COBJS:.o=.cpp) \ - $(SOBJS:.o=.cpp) \ - $(SERVICE_OBJS:.o=.cpp) + $(SOBJS:.o=.cpp) SLICE_SRCS = Test.ice @@ -48,10 +41,6 @@ $(SERVER): $(OBJS) $(SOBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(SOBJS) $(LIBS) -$(SVCFILENAME): $(OBJS) $(SERVICE_OBJS) - rm -f $@ - $(call mkshlib,$@,$(SVCSONAME),$(OBJS) $(SERVICE_OBJS),$(LINKWITH)) - clean:: rm -rf db/node db/registry diff --git a/cpp/test/IceGrid/replication/Makefile.mak b/cpp/test/IceGrid/replication/Makefile.mak index 13f166999c0..ffa2de5e135 100644 --- a/cpp/test/IceGrid/replication/Makefile.mak +++ b/cpp/test/IceGrid/replication/Makefile.mak @@ -12,10 +12,7 @@ top_srcdir = ..\..\.. CLIENT = client.exe SERVER = server.exe -LIBNAME = testservice$(LIBSUFFIX).lib -DLLNAME = testservice$(LIBSUFFIX).dll - -TARGETS = $(CLIENT) $(SERVER) $(LIBNAME) $(DLLNAME) +TARGETS = $(CLIENT) $(SERVER) OBJS = Test.obj @@ -25,13 +22,9 @@ COBJS = Client.obj \ SOBJS = TestI.obj \ Server.obj -SERVICE_OBJS = TestI.obj \ - Service.obj - SRCS = $(OBJS:.obj=.cpp) \ $(COBJS:.obj=.cpp) \ - $(SOBJS:.obj=.cpp) \ - $(SERVICE_OBJS:.obj=.cpp) + $(SOBJS:.obj=.cpp) !include $(top_srcdir)/config/Make.rules.mak @@ -44,12 +37,6 @@ CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb) SPDBFLAGS = /pdb:$(SERVER:.exe=.pdb) !endif -$(LIBNAME) : $(DLLNAME) - -$(DLLNAME): $(OBJS) $(SERVICE_OBJS) - $(LINK) $(LD_DLLFLAGS) $(PDBFLAGS) $(OBJS) $(SERVICE_OBJS) $(PREOUT)$(DLLNAME) $(PRELIBS)$(LINKWITH) \ - freeze$(LIBSUFFIX).lib - $(CLIENT): $(OBJS) $(COBJS) $(LINK) $(LD_EXEFLAGS) $(CPDBFLAGS) $(OBJS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) \ icegrid$(LIBSUFFIX).lib glacier2$(LIBSUFFIX).lib diff --git a/cpp/test/IceGrid/replication/Server.cpp b/cpp/test/IceGrid/replication/Server.cpp index d5062de1f3c..17e83aa307a 100644 --- a/cpp/test/IceGrid/replication/Server.cpp +++ b/cpp/test/IceGrid/replication/Server.cpp @@ -23,7 +23,7 @@ public: int Server::run(int argc, char* argv[]) { - Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("ReplicatedAdapter"); + Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("TestAdapter"); Ice::ObjectPtr object = new TestI(adapter, communicator()->getProperties()); adapter->add(object, communicator()->stringToIdentity(communicator()->getProperties()->getProperty("Identity"))); shutdownOnInterrupt(); diff --git a/cpp/test/IceGrid/replication/Test.ice b/cpp/test/IceGrid/replication/Test.ice index 915c244604e..6cfa505b685 100644 --- a/cpp/test/IceGrid/replication/Test.ice +++ b/cpp/test/IceGrid/replication/Test.ice @@ -15,7 +15,6 @@ module Test interface TestIntf { - string getReplicaIdAndShutdown(); }; }; diff --git a/cpp/test/IceGrid/replication/TestI.cpp b/cpp/test/IceGrid/replication/TestI.cpp index ffaba14f47f..d38029a3f1b 100644 --- a/cpp/test/IceGrid/replication/TestI.cpp +++ b/cpp/test/IceGrid/replication/TestI.cpp @@ -16,9 +16,3 @@ TestI::TestI(const Ice::ObjectAdapterPtr& adapter, const Ice::PropertiesPtr& pro { } -std::string -TestI::getReplicaIdAndShutdown(const Ice::Current&) -{ - _adapter->getCommunicator()->shutdown(); - return _properties->getProperty(_adapter->getName() + ".AdapterId"); -} diff --git a/cpp/test/IceGrid/replication/TestI.h b/cpp/test/IceGrid/replication/TestI.h index 120761a6b3e..0174cb7ccd7 100644 --- a/cpp/test/IceGrid/replication/TestI.h +++ b/cpp/test/IceGrid/replication/TestI.h @@ -18,8 +18,6 @@ public: TestI(const Ice::ObjectAdapterPtr&, const Ice::PropertiesPtr&); - virtual std::string getReplicaIdAndShutdown(const Ice::Current&); - private: Ice::ObjectAdapterPtr _adapter; diff --git a/cpp/test/IceGrid/replication/application.xml b/cpp/test/IceGrid/replication/application.xml index 04bbf99980c..512ef3f3f1d 100644 --- a/cpp/test/IceGrid/replication/application.xml +++ b/cpp/test/IceGrid/replication/application.xml @@ -2,54 +2,40 @@ <application name="Test"> - <replica-group id="Default"> - <object identity="Default" type="::Test::TestIntf"/> - </replica-group> - - <replica-group id="RoundRobin"> - <load-balancing type="round-robin" n-replicas="1"/> - <object identity="RoundRobin" type="::Test::TestIntf"/> - </replica-group> - - <replica-group id="Adaptive"> - <load-balancing type="adaptive" n-replicas="1"/> - <object identity="Adaptive" type="::Test::TestIntf"/> - </replica-group> - - <replica-group id="Random"> - <load-balancing type="random" n-replicas="1"/> - <object identity="Random" type="::Test::TestIntf"/> - </replica-group> - - <server-template id="Server"> + <server-template id="IceGridNode"> <parameter name="id"/> - <parameter name="replicaGroup"/> - <server id="${id}" exe="${test.dir}/server" activation="on-demand" pwd="."> - <adapter name="ReplicatedAdapter" endpoints="default" replica-group="${replicaGroup}"/> - <property name="Identity" value="${replicaGroup}"/> + <server id="${id}" exe="${ice.dir}/bin/icegridnode" activation="manual"> + <option>--nowarn</option> + <adapter name="IceGrid.Node" endpoints="default" register-process="true" wait-for-activation="false"/> + <dbenv name="data"/> + <property name="IceGrid.InstanceName" value="TestIceGrid"/> + <property name="IceGrid.Node.Name" value="${server}"/> + <property name="IceGrid.Node.Data" value="${node.datadir}/servers/${server}/dbs/data"/> + <property name="IceGrid.Node.PropertiesOverride" + value="${properties-override} Ice.ServerIdleTime=0 Ice.PrintProcessId=0 Ice.PrintAdapterReady=0"/> + <property name="Ice.Default.Locator" value="TestIceGrid/Locator:default -p 12050"/> </server> </server-template> - <service-template id="Service"> - <parameter name="name"/> - <parameter name="replicaGroup"/> - <service name="${name}" entry="TestService:create"> - <adapter name="${service}" endpoints="default" replica-group="${replicaGroup}"> - <object identity="${service}"/> - </adapter> - <property name="Identity" value="${replicaGroup}"/> - </service> - </service-template> - - <server-template id="IceBox"> + <server-template id="IceGridRegistry"> <parameter name="id"/> - <parameter name="replicaGroup"/> - <icebox id="${id}" exe="${icebox.exe}" activation="on-demand" pwd="."> - <adapter name="IceBox.ServiceManager" endpoints="tcp -h 127.0.0.1" register-process="true"/> - <service-instance template="Service" name="Service1" replicaGroup="${replicaGroup}"/> - <service-instance template="Service" name="Service2" replicaGroup="${replicaGroup}"/> - <service-instance template="Service" name="Service3" replicaGroup="${replicaGroup}"/> - </icebox> + <parameter name="port"/> + <server id="${id}" exe="${ice.dir}/bin/icegridregistry" activation="manual"> + <option>--nowarn</option> + <dbenv name="data"/> + <property name="IceGrid.InstanceName" value="TestIceGrid"/> + <property name="IceGrid.Registry.Client.Endpoints" value="default -h 127.0.0.1 -p ${port}"/> + <property name="IceGrid.Registry.Server.Endpoints" value="default"/> + <property name="IceGrid.Registry.Internal.Endpoints" value="default"/> + <property name="IceGrid.Registry.SessionManager.Endpoints" value="default"/> + <property name="IceGrid.Registry.ReplicaName" value="${server}"/> + <property name="IceGrid.Registry.Data" value="${node.datadir}/servers/${server}/dbs/data"/> + <property name="IceGrid.Registry.AdminPermissionsVerifier" value="TestIceGrid/NullPermissionsVerifier"/> + <property name="IceGrid.Registry.SessionTimeout" value="0"/> + <property name="IceGrid.Registry.DynamicRegistration" value="1"/> + <property name="Ice.Default.Locator" value="TestIceGrid/Locator:default -p 12050"/> + <property name="IceGrid.Registry.Trace.Replica" value="3"/> + </server> </server-template> </application> diff --git a/cpp/test/IceGrid/replication/run.py b/cpp/test/IceGrid/replication/run.py index 23a03ec8064..915581cc4e8 100755 --- a/cpp/test/IceGrid/replication/run.py +++ b/cpp/test/IceGrid/replication/run.py @@ -26,19 +26,6 @@ testdir = os.path.join(toplevel, "test", name) TestUtil.addLdPath(testdir) -# -# Add locator options for the client and server. Since the server -# invokes on the locator it's also considered to be a client. -# -# NOTE: We also set the retry intervals to retry several times. This -# is necessary for the test to work. The tests invoke successively on -# the same proxy and shutdown the server on each invocation. It takes -# a bit of time for the IceGrid node to detect that the server is down -# and to return a direct proxy from an active server. -# -additionalOptions = " --Ice.Default.Locator=\"IceGrid/Locator:default -p 12010\"" + \ - " --Ice.PrintAdapterReady=0 --Ice.PrintProcessId=0 --Ice.RetryIntervals=\"0 50 100 250\"" - -IceGridAdmin.iceGridTest(name, "application.xml", "--Ice.RetryIntervals=\"0 50 100 250\"", \ - "icebox.exe=" + TestUtil.getIceBox(testdir)) +IceGridAdmin.iceGridTest(name, "application.xml", "", \ + ' \\"properties-override=' + TestUtil.clientServerOptions.replace("--", "") + '\\"') sys.exit(0) |