diff options
author | Benoit Foucher <benoit@zeroc.com> | 2016-11-30 16:28:07 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2016-11-30 16:28:07 +0100 |
commit | 7095fda336eee32fb65895a21d756f59f1c15bb6 (patch) | |
tree | 5b4f43c6eaac49e15ad5fdd50aeab0ef171df928 /cpp/test/Common/TestCommon.cpp | |
parent | Removed Java controller, fixes to investiage IceGrid/replication test failure (diff) | |
download | ice-7095fda336eee32fb65895a21d756f59f1c15bb6.tar.bz2 ice-7095fda336eee32fb65895a21d756f59f1c15bb6.tar.xz ice-7095fda336eee32fb65895a21d756f59f1c15bb6.zip |
Removed RemoteConfig to fix build failure
Diffstat (limited to 'cpp/test/Common/TestCommon.cpp')
-rw-r--r-- | cpp/test/Common/TestCommon.cpp | 95 |
1 files changed, 0 insertions, 95 deletions
diff --git a/cpp/test/Common/TestCommon.cpp b/cpp/test/Common/TestCommon.cpp index e869c7fd0f4..ecdcba43d37 100644 --- a/cpp/test/Common/TestCommon.cpp +++ b/cpp/test/Common/TestCommon.cpp @@ -8,7 +8,6 @@ // ********************************************************************** #include <TestCommon.h> -#include <Controller.h> #include <Ice/Communicator.h> @@ -86,97 +85,3 @@ getTestInitData(int& argc, char* argv[]) Ice::stringSeqToArgs(args, argc, argv); return initData; } - -RemoteConfig::RemoteConfig(const std::string& name, int argc, char** argv, const Ice::CommunicatorPtr& communicator) : - _status(1) -{ - // - // If ControllerHost is defined, we are using a server on a remote host. We expect a - // test controller will already be active. We let exceptions propagate out to - // the caller. - // - // Also look for a ConfigName property, which specifies the name of the configuration - // we are currently testing. - // - std::string controllerHost; - std::string configName; - for(int i = 1; i < argc; ++i) - { - std::string opt = argv[i]; - if(opt.find("--ControllerHost") == 0) - { - std::string::size_type pos = opt.find('='); - if(pos != std::string::npos && opt.size() > pos + 1) - { - controllerHost = opt.substr(pos + 1); - } - } - else if(opt.find("--ConfigName") == 0) - { - std::string::size_type pos = opt.find('='); - if(pos != std::string::npos && opt.size() > pos + 1) - { - configName = opt.substr(pos + 1); - } - } - } - - Test::Common::ServerPrxPtr server; - - if(!controllerHost.empty()) - { - std::string prot = communicator->getProperties()->getPropertyWithDefault("Ice.Default.Protocol", "tcp"); - std::string host; - if(prot != "bt") - { - host = communicator->getProperties()->getProperty("Ice.Default.Host"); - } - - Test::Common::StringSeq options; - - Test::Common::ControllerPrxPtr controller = ICE_CHECKED_CAST(Test::Common::ControllerPrx, - communicator->stringToProxy("controller:tcp -h " + controllerHost + " -p 15000")); - server = controller->runServer("cpp", name, prot, host, false, configName, options); - server->waitForServer(); - } - - _server = server; -} - -RemoteConfig::~RemoteConfig() ICE_NOEXCEPT_FALSE -{ - if(_server) - { - try - { - Test::Common::ServerPrxPtr server = ICE_UNCHECKED_CAST(Test::Common::ServerPrx, _server); - if(_status == 0) - { - server->waitTestSuccess(); - } - else - { - server->terminate(); - } - } - catch(const Ice::LocalException&) - { - if(_status == 0) - { - throw; - } - } - } -} - -bool -RemoteConfig::isRemote() const -{ - return _server != 0; -} - -void -RemoteConfig::finished(int status) -{ - _status = status; -} |