diff options
Diffstat (limited to 'cpp/test')
23 files changed, 820 insertions, 95 deletions
diff --git a/cpp/test/IcePack/Makefile b/cpp/test/IcePack/Makefile index 9d6ac10b9f0..cfabf83226d 100644 --- a/cpp/test/IcePack/Makefile +++ b/cpp/test/IcePack/Makefile @@ -12,7 +12,7 @@ top_srcdir = ../.. include $(top_srcdir)/config/Make.rules -SUBDIRS = simple +SUBDIRS = simple deployer $(EVERYTHING):: @for subdir in $(SUBDIRS); \ diff --git a/cpp/test/IcePack/deployer/.depend b/cpp/test/IcePack/deployer/.depend new file mode 100644 index 00000000000..4df8a3e1b06 --- /dev/null +++ b/cpp/test/IcePack/deployer/.depend @@ -0,0 +1,7 @@ +Test.o: 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/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalObject.h ../../../include/IceUtil/Shared.h ../../../include/Ice/StreamF.h ../../../include/Ice/Proxy.h ../../../include/IceUtil/Mutex.h ../../../include/IceUtil/Lock.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/ConnectionF.h ../../../include/Ice/EndpointF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Current.h ../../../include/Ice/Identity.h ../../../include/Ice/Facet.h ../../../include/Ice/Object.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/Buffer.h ../../../include/Ice/ObjectFactoryF.h ../../../include/Ice/Incoming.h ../../../include/Ice/Direct.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/ObjectFactory.h ../../../include/Ice/Stream.h ../../../include/Ice/BuiltinSequences.h +Client.o: Client.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Initialize.h ../../../include/Ice/CommunicatorF.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/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalObject.h ../../../include/IceUtil/Shared.h ../../../include/Ice/StreamF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/InstanceF.h ../../../include/Ice/BuiltinSequences.h ../../../include/Ice/Proxy.h ../../../include/IceUtil/Mutex.h ../../../include/IceUtil/Lock.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/ConnectionF.h ../../../include/Ice/EndpointF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Current.h ../../../include/Ice/Identity.h ../../../include/Ice/Facet.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/IceUtil/Monitor.h ../../../include/IceUtil/Cond.h ../../../include/IceUtil/Time.h ../../../include/Ice/BasicStream.h ../../../include/Ice/Buffer.h ../../../include/Ice/ObjectFactoryF.h ../../../include/Ice/Incoming.h ../../../include/Ice/Direct.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/LoggerUtil.h ../../../include/Ice/LoggerF.h ../../../include/Ice/Communicator.h ../../../include/Ice/UserExceptionFactoryF.h ../../../include/Ice/RouterF.h ../../../include/Ice/LocatorF.h ../../../include/Ice/PluginF.h ../../../include/Ice/ObjectFactory.h ../../../include/Ice/UserExceptionFactory.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/ServantLocator.h ../../../include/Ice/IdentityUtil.h ../../include/TestCommon.h Test.h +AllTests.o: AllTests.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Initialize.h ../../../include/Ice/CommunicatorF.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/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalObject.h ../../../include/IceUtil/Shared.h ../../../include/Ice/StreamF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/InstanceF.h ../../../include/Ice/BuiltinSequences.h ../../../include/Ice/Proxy.h ../../../include/IceUtil/Mutex.h ../../../include/IceUtil/Lock.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/ConnectionF.h ../../../include/Ice/EndpointF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Current.h ../../../include/Ice/Identity.h ../../../include/Ice/Facet.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/IceUtil/Monitor.h ../../../include/IceUtil/Cond.h ../../../include/IceUtil/Time.h ../../../include/Ice/BasicStream.h ../../../include/Ice/Buffer.h ../../../include/Ice/ObjectFactoryF.h ../../../include/Ice/Incoming.h ../../../include/Ice/Direct.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/LoggerUtil.h ../../../include/Ice/LoggerF.h ../../../include/Ice/Communicator.h ../../../include/Ice/UserExceptionFactoryF.h ../../../include/Ice/RouterF.h ../../../include/Ice/LocatorF.h ../../../include/Ice/PluginF.h ../../../include/Ice/ObjectFactory.h ../../../include/Ice/UserExceptionFactory.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/ServantLocator.h ../../../include/Ice/IdentityUtil.h ../../../include/IcePack/Admin.h ../../../include/Yellow/Yellow.h ../../include/TestCommon.h Test.h +TestI.o: TestI.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Initialize.h ../../../include/Ice/CommunicatorF.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/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalObject.h ../../../include/IceUtil/Shared.h ../../../include/Ice/StreamF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/InstanceF.h ../../../include/Ice/BuiltinSequences.h ../../../include/Ice/Proxy.h ../../../include/IceUtil/Mutex.h ../../../include/IceUtil/Lock.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/ConnectionF.h ../../../include/Ice/EndpointF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Current.h ../../../include/Ice/Identity.h ../../../include/Ice/Facet.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/IceUtil/Monitor.h ../../../include/IceUtil/Cond.h ../../../include/IceUtil/Time.h ../../../include/Ice/BasicStream.h ../../../include/Ice/Buffer.h ../../../include/Ice/ObjectFactoryF.h ../../../include/Ice/Incoming.h ../../../include/Ice/Direct.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/LoggerUtil.h ../../../include/Ice/LoggerF.h ../../../include/Ice/Communicator.h ../../../include/Ice/UserExceptionFactoryF.h ../../../include/Ice/RouterF.h ../../../include/Ice/LocatorF.h ../../../include/Ice/PluginF.h ../../../include/Ice/ObjectFactory.h ../../../include/Ice/UserExceptionFactory.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/ServantLocator.h ../../../include/Ice/IdentityUtil.h TestI.h Test.h +Server.o: Server.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Initialize.h ../../../include/Ice/CommunicatorF.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/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalObject.h ../../../include/IceUtil/Shared.h ../../../include/Ice/StreamF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/InstanceF.h ../../../include/Ice/BuiltinSequences.h ../../../include/Ice/Proxy.h ../../../include/IceUtil/Mutex.h ../../../include/IceUtil/Lock.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/ConnectionF.h ../../../include/Ice/EndpointF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Current.h ../../../include/Ice/Identity.h ../../../include/Ice/Facet.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/IceUtil/Monitor.h ../../../include/IceUtil/Cond.h ../../../include/IceUtil/Time.h ../../../include/Ice/BasicStream.h ../../../include/Ice/Buffer.h ../../../include/Ice/ObjectFactoryF.h ../../../include/Ice/Incoming.h ../../../include/Ice/Direct.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/LoggerUtil.h ../../../include/Ice/LoggerF.h ../../../include/Ice/Communicator.h ../../../include/Ice/UserExceptionFactoryF.h ../../../include/Ice/RouterF.h ../../../include/Ice/LocatorF.h ../../../include/Ice/PluginF.h ../../../include/Ice/ObjectFactory.h ../../../include/Ice/UserExceptionFactory.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/ServantLocator.h ../../../include/Ice/IdentityUtil.h ../../../include/Ice/Application.h TestI.h Test.h +TestI.o: TestI.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Initialize.h ../../../include/Ice/CommunicatorF.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/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalObject.h ../../../include/IceUtil/Shared.h ../../../include/Ice/StreamF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/InstanceF.h ../../../include/Ice/BuiltinSequences.h ../../../include/Ice/Proxy.h ../../../include/IceUtil/Mutex.h ../../../include/IceUtil/Lock.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/ConnectionF.h ../../../include/Ice/EndpointF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Current.h ../../../include/Ice/Identity.h ../../../include/Ice/Facet.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/IceUtil/Monitor.h ../../../include/IceUtil/Cond.h ../../../include/IceUtil/Time.h ../../../include/Ice/BasicStream.h ../../../include/Ice/Buffer.h ../../../include/Ice/ObjectFactoryF.h ../../../include/Ice/Incoming.h ../../../include/Ice/Direct.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/LoggerUtil.h ../../../include/Ice/LoggerF.h ../../../include/Ice/Communicator.h ../../../include/Ice/UserExceptionFactoryF.h ../../../include/Ice/RouterF.h ../../../include/Ice/LocatorF.h ../../../include/Ice/PluginF.h ../../../include/Ice/ObjectFactory.h ../../../include/Ice/UserExceptionFactory.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/ServantLocator.h ../../../include/Ice/IdentityUtil.h TestI.h Test.h +Service.o: Service.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Initialize.h ../../../include/Ice/CommunicatorF.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/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalObject.h ../../../include/IceUtil/Shared.h ../../../include/Ice/StreamF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/InstanceF.h ../../../include/Ice/BuiltinSequences.h ../../../include/Ice/Proxy.h ../../../include/IceUtil/Mutex.h ../../../include/IceUtil/Lock.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/ConnectionF.h ../../../include/Ice/EndpointF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Current.h ../../../include/Ice/Identity.h ../../../include/Ice/Facet.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/IceUtil/Monitor.h ../../../include/IceUtil/Cond.h ../../../include/IceUtil/Time.h ../../../include/Ice/BasicStream.h ../../../include/Ice/Buffer.h ../../../include/Ice/ObjectFactoryF.h ../../../include/Ice/Incoming.h ../../../include/Ice/Direct.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/LoggerUtil.h ../../../include/Ice/LoggerF.h ../../../include/Ice/Communicator.h ../../../include/Ice/UserExceptionFactoryF.h ../../../include/Ice/RouterF.h ../../../include/Ice/LocatorF.h ../../../include/Ice/PluginF.h ../../../include/Ice/ObjectFactory.h ../../../include/Ice/UserExceptionFactory.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/ServantLocator.h ../../../include/Ice/IdentityUtil.h ../../../include/IceBox/IceBox.h ../../../include/Freeze/DB.h ../../../include/Freeze/DBException.h ../../../include/Freeze/DBF.h ../../../include/Freeze/EvictorF.h ../../../include/Freeze/Freeze.h ../../../include/Freeze/Initialize.h ../../../include/Freeze/Evictor.h ../../../include/Freeze/Map.h TestI.h Test.h diff --git a/cpp/test/IcePack/deployer/AllTests.cpp b/cpp/test/IcePack/deployer/AllTests.cpp new file mode 100644 index 00000000000..28ac9beb5cf --- /dev/null +++ b/cpp/test/IcePack/deployer/AllTests.cpp @@ -0,0 +1,159 @@ +// ********************************************************************** +// +// Copyright (c) 2001 +// Mutable Realms, Inc. +// Huntsville, AL, USA +// +// All Rights Reserved +// +// ********************************************************************** + +#include <Ice/Ice.h> +#include <Ice/BuiltinSequences.h> +#include <Ice/IdentityUtil.h> +#include <IcePack/Admin.h> +#include <Yellow/Yellow.h> +#include <TestCommon.h> +#include <Test.h> + +using namespace std; + +struct ProxyIdentityEqual : public std::binary_function<Ice::ObjectPrx,string,bool> +{ + +public: + + bool + operator()(const Ice::ObjectPrx& p1, const string& id) const + { + return p1->ice_getIdentity() == Ice::stringToIdentity(id); + } +}; + +void +allCommonTests(const Ice::CommunicatorPtr& communicator) +{ + IcePack::AdminPrx admin = IcePack::AdminPrx::checkedCast( + communicator->stringToProxy("IcePack/Admin@IcePackAdminAdapter")); + test(admin); + + cout << "test server registration..." << flush; + IcePack::ServerNames serverNames = admin->getAllServerNames(); + test(find(serverNames.begin(), serverNames.end(), "Server1") != serverNames.end()); + test(find(serverNames.begin(), serverNames.end(), "Server2") != serverNames.end()); + test(find(serverNames.begin(), serverNames.end(), "IceBox1") != serverNames.end()); + test(find(serverNames.begin(), serverNames.end(), "IceBox2") != serverNames.end()); + cout << "ok" << endl; + + cout << "testing adapter registration... " << flush; + IcePack::AdapterNames adapterNames = admin->getAllAdapterNames(); + test(find(adapterNames.begin(), adapterNames.end(), "Server1Adapter") != adapterNames.end()); + test(find(adapterNames.begin(), adapterNames.end(), "Server2Adapter") != adapterNames.end()); + test(find(adapterNames.begin(), adapterNames.end(), "IceBox1Service1Adapter") != adapterNames.end()); + test(find(adapterNames.begin(), adapterNames.end(), "IceBox1Service2Adapter") != adapterNames.end()); + test(find(adapterNames.begin(), adapterNames.end(), "IceBox2Service1Adapter") != adapterNames.end()); + test(find(adapterNames.begin(), adapterNames.end(), "IceBox2Service2Adapter") != adapterNames.end()); + cout << "ok" << endl; + + Yellow::QueryPrx yellow = Yellow::QueryPrx::checkedCast( + communicator->stringToProxy("Yellow/Query@YellowQueryAdapter")); + test(yellow); + + cout << "testing offer registration... " << flush; + Ice::ObjectProxySeq offers = yellow->lookupAll("::Test"); + test(find_if(offers.begin(), offers.end(), bind2nd(ProxyIdentityEqual(),"Server1")) != offers.end()); + test(find_if(offers.begin(), offers.end(), bind2nd(ProxyIdentityEqual(),"Server2")) != offers.end()); + test(find_if(offers.begin(), offers.end(), bind2nd(ProxyIdentityEqual(),"IceBox1Service1")) != offers.end()); + test(find_if(offers.begin(), offers.end(), bind2nd(ProxyIdentityEqual(),"IceBox1Service2")) != offers.end()); + test(find_if(offers.begin(), offers.end(), bind2nd(ProxyIdentityEqual(),"IceBox2Service1")) != offers.end()); + test(find_if(offers.begin(), offers.end(), bind2nd(ProxyIdentityEqual(),"IceBox2Service2")) != offers.end()); + + cout << "ok" << endl; +} + +void +allTests(const Ice::CommunicatorPtr& communicator) +{ + allCommonTests(communicator); + + // + // Ensure that all server and service objects are reachable. + // + // The identity for the test object in deployed server or services + // is the name of the service or server. The object adapter name + // is Adapter prefixed with the name of the service or + // server. Ensure we can reach each object. + // + cout << "pinging server objects... " << flush; + + TestPrx obj; + + obj = TestPrx::checkedCast(communicator->stringToProxy("Server1@Server1Adapter")); + obj = TestPrx::checkedCast(communicator->stringToProxy("Server2@Server2Adapter")); + obj = TestPrx::checkedCast(communicator->stringToProxy("IceBox1Service1@IceBox1Service1Adapter")); + obj = TestPrx::checkedCast(communicator->stringToProxy("IceBox1Service2@IceBox1Service2Adapter")); + obj = TestPrx::checkedCast(communicator->stringToProxy("IceBox2Service1@IceBox2Service1Adapter")); + obj = TestPrx::checkedCast(communicator->stringToProxy("IceBox2Service2@IceBox2Service2Adapter")); + + cout << "ok" << endl; + + cout << "testing server configuration... " << flush; + + obj = TestPrx::checkedCast(communicator->stringToProxy("Server1@Server1Adapter")); + test(obj->getProperty("Type") == "Server"); + test(obj->getProperty("Name") == "Server1"); + + cout << "ok" << endl; + + cout << "testing service configuration... " << flush; + + obj = TestPrx::checkedCast(communicator->stringToProxy("IceBox1Service1@IceBox1Service1Adapter")); + test(obj->getProperty("IceBox1Service1.Type") == "standard"); + test(obj->getProperty("IceBox1Service1.ServiceName") == "IceBox1Service1"); + + obj = TestPrx::checkedCast(communicator->stringToProxy("IceBox2Service2@IceBox2Service2Adapter")); + test(obj->getProperty("IceBox2Service2.Type") == "freeze"); + test(obj->getProperty("IceBox2Service2.ServiceName") == "IceBox2Service2"); + + test(obj->getProperty("IceBox2Service2.DebugProperty") == ""); + test(obj->getProperty("IceBox1Service1.DebugProperty") == ""); + + cout << "ok" << endl; +} + +void +allTestsWithTarget(const Ice::CommunicatorPtr& communicator) +{ + allCommonTests(communicator); + + IcePack::AdminPrx admin = IcePack::AdminPrx::checkedCast( + communicator->stringToProxy("IcePack/Admin@IcePackAdminAdapter")); + test(admin); + + cout << "pinging server objects... " << flush; + + // + // Application is deployed with Server1.manual which disables on demand activation. + // + TestPrx obj; + try + { + obj = TestPrx::checkedCast(communicator->stringToProxy("Server1@Server1Adapter")); + test(false); + } + catch(const Ice::LocalException&) + { + } + admin->startServer("Server1"); + + obj = TestPrx::checkedCast(communicator->stringToProxy("Server2@Server2Adapter")); + + cout << "ok" << endl; + + cout << "testing service configuration... " << flush; + + obj = TestPrx::checkedCast(communicator->stringToProxy("IceBox1Service1@IceBox1Service1Adapter")); + test(obj->getProperty("IceBox1Service1.DebugProperty") == "debug"); + + cout << "ok" << endl; +} diff --git a/cpp/test/IcePack/deployer/Client.cpp b/cpp/test/IcePack/deployer/Client.cpp new file mode 100644 index 00000000000..9bb8f2d4217 --- /dev/null +++ b/cpp/test/IcePack/deployer/Client.cpp @@ -0,0 +1,80 @@ +// ********************************************************************** +// +// Copyright (c) 2001 +// Mutable Realms, Inc. +// Huntsville, AL, USA +// +// All Rights Reserved +// +// ********************************************************************** + +#include <Ice/Ice.h> +#include <TestCommon.h> +#include <Test.h> + +using namespace std; + +int +run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) +{ + bool withTarget = false; + if(argc > 1) + { + int i = 1; + while(i < argc) + { + if(strcmp(argv[i], "-t") == 0) + { + withTarget = true; + break; + } + i++; + } + } + + if(!withTarget) + { + void allTests(const Ice::CommunicatorPtr&); + allTests(communicator); + } + else + { + void allTestsWithTarget(const Ice::CommunicatorPtr&); + allTestsWithTarget(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/IcePack/deployer/Makefile b/cpp/test/IcePack/deployer/Makefile new file mode 100644 index 00000000000..88e4a8898c2 --- /dev/null +++ b/cpp/test/IcePack/deployer/Makefile @@ -0,0 +1,64 @@ +# ********************************************************************** +# +# Copyright (c) 2001 +# Mutable Realms, Inc. +# Huntsville, AL, USA +# +# All Rights Reserved +# +# ********************************************************************** + +top_srcdir = ../../.. + +CLIENT = client +SERVER = server +SERVICE = libTestService.so +VERSIONED_SVC = $(SERVICE).$(VERSION) + +TARGETS = $(CLIENT) $(SERVER) $(SERVICE) $(VERSIONED_SVC) + +OBJS = Test.o + +COBJS = Client.o \ + AllTests.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) + +include $(top_srcdir)/config/Make.rules + +CPPFLAGS := -I. -I../../include $(CPPFLAGS) + +$(CLIENT): $(OBJS) $(COBJS) + rm -f $@ + $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(COBJS) -lIcePack -lYellow $(LIBS) + +$(SERVER): $(OBJS) $(SOBJS) + rm -f $@ + $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(SOBJS) $(LIBS) + +$(VERSIONED_SVC): $(OBJS) $(SERVICE_OBJS) + rm -f $@ + $(CXX) -Xlinker -soname -Xlinker $(VERSIONED_SERVICE) $(LDFLAGS) -shared -o $@ $(OBJS) $(SERVICE_OBJS) + +$(SERVICE): $(VERSIONED_SVC) + rm -f $@ + ln -s $(VERSIONED_SVC) $@ + + +Test.h Test.cpp: Test.ice $(SLICE2CPP) + rm -f Test.h Test.cpp + $(SLICE2CPP) Test.ice + +clean:: + rm -f Test.h Test.cpp + +include .depend diff --git a/cpp/test/IcePack/deployer/Server.cpp b/cpp/test/IcePack/deployer/Server.cpp new file mode 100644 index 00000000000..c68f83839b4 --- /dev/null +++ b/cpp/test/IcePack/deployer/Server.cpp @@ -0,0 +1,47 @@ +// ********************************************************************** +// +// Copyright (c) 2001 +// Mutable Realms, Inc. +// Huntsville, AL, USA +// +// All Rights Reserved +// +// ********************************************************************** + +#include <Ice/Ice.h> +#include <Ice/Application.h> +#include <TestI.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::PropertiesPtr properties = communicator()->getProperties(); + string name = properties->getProperty("Ice.ProgramName"); + + Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter(name + "Adapter"); + Ice::ObjectPtr object = new TestI(adapter, properties); + adapter->add(object, Ice::stringToIdentity(name)); + adapter->activate(); + shutdownOnInterrupt(); + communicator()->waitForShutdown(); + ignoreInterrupt(); + return EXIT_SUCCESS; +} + +int +main(int argc, char* argv[]) +{ + Server app; + int rc = app.main(argc, argv); + return rc; +} diff --git a/cpp/test/IcePack/deployer/Service.cpp b/cpp/test/IcePack/deployer/Service.cpp new file mode 100644 index 00000000000..b1a54c8bc23 --- /dev/null +++ b/cpp/test/IcePack/deployer/Service.cpp @@ -0,0 +1,130 @@ +// ********************************************************************** +// +// Copyright (c) 2001 +// MutableRealms, Inc. +// Huntsville, AL, USA +// +// All Rights Reserved +// +// ********************************************************************** + +#include <Ice/Ice.h> +#include <IceBox/IceBox.h> +#include <Freeze/Freeze.h> +#include <TestI.h> + +#if defined(_WIN32) +# define TEST_SERVICE_API __declspec(dllexport) +#else +# define TEST_SERVICE_API /**/ +#endif + +using namespace std; +using namespace Ice; + +class TEST_SERVICE_API ServiceI : public ::IceBox::Service +{ +public: + + ServiceI(); + virtual ~ServiceI(); + + virtual void start(const string&, + const CommunicatorPtr&, + const PropertiesPtr&, + const StringSeq&); + + virtual void stop(); +}; + +class TEST_SERVICE_API FreezeServiceI : public ::IceBox::FreezeService +{ +public: + + FreezeServiceI(); + virtual ~FreezeServiceI(); + + virtual void start(const string&, + const CommunicatorPtr&, + const PropertiesPtr&, + const StringSeq&, + const Freeze::DBEnvironmentPtr&); + + virtual void stop(); +}; + +extern "C" +{ + +// +// Factory function +// +TEST_SERVICE_API ::IceBox::Service* +create(CommunicatorPtr communicator) +{ + return new ServiceI; +} + +TEST_SERVICE_API ::IceBox::FreezeService* +createFreezeService(CommunicatorPtr communicator) +{ + return new FreezeServiceI; +} + +} + +ServiceI::ServiceI() +{ +} + +ServiceI::~ServiceI() +{ +} + +void +ServiceI::start(const string& name, + const CommunicatorPtr& communicator, + const PropertiesPtr& properties, + const StringSeq& args) +{ + Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter(name + "Adapter"); + Ice::ObjectPtr object = new TestI(adapter, properties); + adapter->add(object, Ice::stringToIdentity(name)); + adapter->activate(); +} + +void +ServiceI::stop() +{ +} + +FreezeServiceI::FreezeServiceI() +{ +} + +FreezeServiceI::~FreezeServiceI() +{ +} + +void +FreezeServiceI::start(const string& name, + const CommunicatorPtr& communicator, + const PropertiesPtr& properties, + const StringSeq& args, + const Freeze::DBEnvironmentPtr& dbEnv) +{ + // + // Ensure that we can create an environment. + // + Freeze::DBPtr db = dbEnv->openDB("testdb", true); + + Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter(name + "Adapter"); + Ice::ObjectPtr object = new TestI(adapter, properties); + adapter->add(object, Ice::stringToIdentity(name)); + adapter->activate(); +} + +void +FreezeServiceI::stop() +{ +} diff --git a/cpp/test/IcePack/deployer/Test.ice b/cpp/test/IcePack/deployer/Test.ice new file mode 100644 index 00000000000..6d4d1189b0d --- /dev/null +++ b/cpp/test/IcePack/deployer/Test.ice @@ -0,0 +1,21 @@ +// ********************************************************************** +// +// Copyright (c) 2001 +// Mutable Realms, Inc. +// Huntsville, AL, USA +// +// All Rights Reserved +// +// ********************************************************************** + +#ifndef TEST_ICE +#define TEST_ICE + +interface Test +{ + void shutdown(); + + string getProperty(string name); +}; + +#endif diff --git a/cpp/test/IcePack/deployer/TestI.cpp b/cpp/test/IcePack/deployer/TestI.cpp new file mode 100644 index 00000000000..57245e39a69 --- /dev/null +++ b/cpp/test/IcePack/deployer/TestI.cpp @@ -0,0 +1,30 @@ +// ********************************************************************** +// +// Copyright (c) 2001 +// Mutable Realms, Inc. +// Huntsville, AL, USA +// +// All Rights Reserved +// +// ********************************************************************** + +#include <Ice/Ice.h> +#include <TestI.h> + +TestI::TestI(const Ice::ObjectAdapterPtr& adapter, const Ice::PropertiesPtr& properties) : + _adapter(adapter), + _properties(properties) +{ +} + +void +TestI::shutdown(const Ice::Current&) +{ + _adapter->getCommunicator()->shutdown(); +} + +std::string +TestI::getProperty(const std::string& name, const Ice::Current&) +{ + return _properties->getProperty(name); +} diff --git a/cpp/test/IcePack/deployer/TestI.h b/cpp/test/IcePack/deployer/TestI.h new file mode 100644 index 00000000000..21870e8cde8 --- /dev/null +++ b/cpp/test/IcePack/deployer/TestI.h @@ -0,0 +1,31 @@ +// ********************************************************************** +// +// Copyright (c) 2001 +// Mutable Realms, Inc. +// Huntsville, AL, USA +// +// All Rights Reserved +// +// ********************************************************************** + +#ifndef TEST_I_H +#define TEST_I_H + +#include <Test.h> + +class TestI : public Test +{ +public: + + TestI(const Ice::ObjectAdapterPtr&, const Ice::PropertiesPtr&); + + virtual void shutdown(const Ice::Current&); + virtual std::string getProperty(const std::string&, const Ice::Current&); + +private: + + Ice::ObjectAdapterPtr _adapter; + Ice::PropertiesPtr _properties; +}; + +#endif diff --git a/cpp/test/IcePack/deployer/application.xml b/cpp/test/IcePack/deployer/application.xml new file mode 100644 index 00000000000..ba7d00e63f9 --- /dev/null +++ b/cpp/test/IcePack/deployer/application.xml @@ -0,0 +1,10 @@ +<application> + + <server name="Yellow" descriptor="yellow_icebox.xml"/> + + <server name="IceBox1" descriptor="icebox.xml"/> + <server name="IceBox2" descriptor="icebox.xml"/> + <server name="Server1" binpath="server" descriptor="server.xml"/> + <server name="Server2" binpath="server" descriptor="server.xml"/> + +</application>
\ No newline at end of file diff --git a/cpp/test/IcePack/deployer/db/.dummy b/cpp/test/IcePack/deployer/db/.dummy new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/cpp/test/IcePack/deployer/db/.dummy diff --git a/cpp/test/IcePack/deployer/db/db/.dummy b/cpp/test/IcePack/deployer/db/db/.dummy new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/cpp/test/IcePack/deployer/db/db/.dummy diff --git a/cpp/test/IcePack/deployer/freezeservice.xml b/cpp/test/IcePack/deployer/freezeservice.xml new file mode 100644 index 00000000000..5dd9940494e --- /dev/null +++ b/cpp/test/IcePack/deployer/freezeservice.xml @@ -0,0 +1,18 @@ +<service kind="freeze" entry="TestService:createFreezeService"> + + <adapters> + <adapter name="${name}Adapter" endpoints="default"> + <offer interface="::Test" identity="${name}"/> + </adapter> + </adapters> + + <properties> + <property name="${name}.Type" value="freeze"/> + <property name="${name}.ServiceName" value="${name}"/> + </properties> + + <target name="manual"> + <property name="Mode" value="manual"/> + </target> + +</service>
\ No newline at end of file diff --git a/cpp/test/IcePack/deployer/icebox.xml b/cpp/test/IcePack/deployer/icebox.xml new file mode 100644 index 00000000000..a1115a3a3ab --- /dev/null +++ b/cpp/test/IcePack/deployer/icebox.xml @@ -0,0 +1,21 @@ +<server kind="cpp-icebox" endpoints="default"> + + <service name="${name}Service1" descriptor="service.xml"/> + <service name="${name}Service2" descriptor="freezeservice.xml"/> + + <properties> + <property name="Ice.ConnectionWarnings" value="1"/> + </properties> + + <target name="ssl"> + <properties> + <property name="Ice.Plugin.IceSSL" value="IceSSL:create"/> + <property name="Ice.Default.Protocol" value="ssl"/> + <property name="IceSSL.Client.CertPath" location="../../../certs"/> + <property name="IceSSL.Client.Config" value="client_sslconfig.xml"/> + <property name="IceSSL.Server.CertPath" location="../../../certs"/> + <property name="IceSSL.Server.Config" value="server_sslconfig.xml"/> + </properties> + </target> + +</server>
\ No newline at end of file diff --git a/cpp/test/IcePack/deployer/icestorm_icebox.xml b/cpp/test/IcePack/deployer/icestorm_icebox.xml deleted file mode 100644 index ffe5fa0e5ac..00000000000 --- a/cpp/test/IcePack/deployer/icestorm_icebox.xml +++ /dev/null @@ -1,8 +0,0 @@ -<server kind="cpp-icebox" endpoints="default"> - -<services> - <service name="AnIceStorm" descriptor="icestorm_service.xml"/> - <service name="AnotherIceStorm" descriptor="icestorm_service.xml"/> -</services> - -</server> diff --git a/cpp/test/IcePack/deployer/icestorm_service.xml b/cpp/test/IcePack/deployer/icestorm_service.xml deleted file mode 100644 index ae1007f1062..00000000000 --- a/cpp/test/IcePack/deployer/icestorm_service.xml +++ /dev/null @@ -1,17 +0,0 @@ -<service kind="freeze" entry="IceStormService:create" endpoints="default"> - -<adapters> - <adapter name="${name}.TopicManagerAdapter"> - <offer interface="::IceStorm::TopicManager" identity="${name}"/> - </adapter> -</adapters> - -<properties> - <property name="${name}.TopicManager.Endpoints" value="default"/> - - <!-- FIXME: wrong configuration variable name for the topic manager --> - <!-- object identity --> - <property name="${name}.TopicManager" value="${name}"/> -</properties> - -</service> diff --git a/cpp/test/IcePack/deployer/run.py b/cpp/test/IcePack/deployer/run.py new file mode 100755 index 00000000000..667ad26bc43 --- /dev/null +++ b/cpp/test/IcePack/deployer/run.py @@ -0,0 +1,93 @@ +#!/usr/bin/env python +# ********************************************************************** +# +# Copyright (c) 2001 +# Mutable Realms, Inc. +# Huntsville, AL, USA +# +# All Rights Reserved +# +# ********************************************************************** + +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 IcePackAdmin + +testdir = os.path.join(toplevel, "test", "IcePack", "deployer") + + +os.environ['LD_LIBRARY_PATH'] = testdir + ":" + os.environ['LD_LIBRARY_PATH'] + +# +# Start the client. +# +def startClient(options): + + updatedClientOptions = TestUtil.clientOptions.replace("TOPLEVELDIR", toplevel) + \ + " --Ice.Default.Locator=\"IcePack/Locator:default -p 12346\" " + \ + options + + print "starting client...", + clientPipe = os.popen(os.path.join(testdir, "client") + updatedClientOptions) + print "ok" + + for output in clientPipe.xreadlines(): + print output, + + clientStatus = clientPipe.close() + if clientStatus: + print "failed" + +if TestUtil.protocol == "ssl": + targets = "ssl" +else: + targets = "" + +# +# Start IcePack. +# +TestUtil.cleanDbDir(os.path.join(testdir, "db/db")) +icePackPipe = IcePackAdmin.startIcePack(toplevel, "12346", testdir) + +# +# Deploy the application, run the client and remove the application. +# +print "deploying application...", +IcePackAdmin.addApplication(toplevel, os.path.join(testdir, "application.xml"), targets); +print "ok" + +startClient("") + +print "removing application...", +IcePackAdmin.removeApplication(toplevel, os.path.join(testdir, "application.xml")); +print "ok" + +# +# Deploy the application with some targets to test targets, run the +# client to test targets (-t options) and remove the application. +# +print "deploying application with target...", +IcePackAdmin.addApplication(toplevel, os.path.join(testdir, "application.xml"), targets + " debug Server1.manual"); +print "ok" + +startClient("-t") + +print "removing application...", +IcePackAdmin.removeApplication(toplevel, os.path.join(testdir, "application.xml")); +print "ok" + +# +# Shutdown IcePack. +# +IcePackAdmin.shutdownIcePack(toplevel, icePackPipe) + +sys.exit(0) diff --git a/cpp/test/IcePack/deployer/server.xml b/cpp/test/IcePack/deployer/server.xml new file mode 100644 index 00000000000..ac21a8cbd0f --- /dev/null +++ b/cpp/test/IcePack/deployer/server.xml @@ -0,0 +1,31 @@ +<server kind="cpp"> + + <target name="manual"> + <activation mode="manual"/> + <property name="Mode" value="manual"/> + </target> + + <adapters> + <adapter name="${name}Adapter" endpoints="default"> + <offer interface="::Test" identity="${name}"/> + </adapter> + </adapters> + + <properties> + <property name="Type" value="Server"/> + <property name="Name" value="${name}"/> + <property name="Ice.ConnectionWarnings" value="1"/> + </properties> + + <target name="ssl"> + <properties> + <property name="Ice.Plugin.IceSSL" value="IceSSL:create"/> + <property name="Ice.Default.Protocol" value="ssl"/> + <property name="IceSSL.Client.CertPath" location="../../../certs"/> + <property name="IceSSL.Client.Config" value="client_sslconfig.xml"/> + <property name="IceSSL.Server.CertPath" location="../../../certs"/> + <property name="IceSSL.Server.Config" value="server_sslconfig.xml"/> + </properties> + </target> + +</server>
\ No newline at end of file diff --git a/cpp/test/IcePack/deployer/service.xml b/cpp/test/IcePack/deployer/service.xml new file mode 100644 index 00000000000..d62c74789b5 --- /dev/null +++ b/cpp/test/IcePack/deployer/service.xml @@ -0,0 +1,20 @@ +<service kind="standard" entry="TestService:create"> + + <adapters> + <adapter name="${name}Adapter" endpoints="default"> + <offer interface="::Test" identity="${name}"/> + </adapter> + </adapters> + + <properties> + <property name="${name}.Type" value="standard"/> + <property name="${name}.ServiceName" value="${name}"/> + </properties> + + <target name="debug"> + <properties> + <property name="${name}.DebugProperty" value="debug"/> + </properties> + </target> + +</service>
\ No newline at end of file diff --git a/cpp/test/IcePack/deployer/yellow_icebox.xml b/cpp/test/IcePack/deployer/yellow_icebox.xml index 095e8bb0518..257a0a521cc 100644 --- a/cpp/test/IcePack/deployer/yellow_icebox.xml +++ b/cpp/test/IcePack/deployer/yellow_icebox.xml @@ -1,7 +1,18 @@ <server kind="cpp-icebox" endpoints="default"> + + <services> + <service name="Yellow" descriptor="yellow_service.xml"/> + </services> -<services> - <service name="Yellow" descriptor="yellow_service.xml"/> -</services> + <target name="ssl"> + <properties> + <property name="Ice.Plugin.IceSSL" value="IceSSL:create"/> + <property name="Ice.Default.Protocol" value="ssl"/> + <property name="IceSSL.Client.CertPath" location="../../../certs"/> + <property name="IceSSL.Client.Config" value="client_sslconfig.xml"/> + <property name="IceSSL.Server.CertPath" location="../../../certs"/> + <property name="IceSSL.Server.Config" value="server_sslconfig.xml"/> + </properties> + </target> </server> diff --git a/cpp/test/IcePack/simple/run.py b/cpp/test/IcePack/simple/run.py index f1e00d3f108..508743bf808 100755 --- a/cpp/test/IcePack/simple/run.py +++ b/cpp/test/IcePack/simple/run.py @@ -26,11 +26,10 @@ name = os.path.join("IcePack", "simple") testdir = os.path.join(toplevel, "test", "IcePack", "simple") # -# Add locator options for client and servers. All servers are now -# clients since they need to make requests to IcePack. +# Add locator options for the client and server. Since the server +# invokes on the locator it's also considered to be a client. # -additionalOptions = " --Ice.Default.Locator=\"IcePack/locator:default -p 12346\" " + \ - "--Ice.Adapter.TestAdapter.Endpoints=default" +additionalOptions = " --Ice.Default.Locator=\"IcePack/Locator:default -p 12346\"" TestUtil.cleanDbDir(os.path.join(testdir, "db/db")) @@ -40,82 +39,49 @@ TestUtil.cleanDbDir(os.path.join(testdir, "db/db")) icePackPipe = IcePackAdmin.startIcePack(toplevel, "12346", testdir) # -# Test client/server, collocated w/o automatic activation. +# Test client/server, collocated without on demand activation. # TestUtil.mixedClientServerTestWithOptions(toplevel, name, additionalOptions, additionalOptions) TestUtil.collocatedTestWithOptions(toplevel, name, additionalOptions) # -# Get adapter list, ensure that TestAdapter is in the list. +# Remove the adapter (registered by the server) before deploying the +# server. # -print "testing adapter registration...", -hasTestAdapter = 0; -icePackAdminPipe = IcePackAdmin.listAdapters(toplevel); -for adaptername in icePackAdminPipe.xreadlines(): - if adaptername.strip() == "TestAdapter": - hasTestAdapter = 1 - -if hasTestAdapter == 0: - print "failed!" - TestUtil.killServers() - sys.exit(1) - -icePackStatus = icePackAdminPipe.close() -if icePackStatus: - TestUtil.killServers() - sys.exit(1) -print "ok" - IcePackAdmin.removeAdapter(toplevel, "TestAdapter") # -# This test doesn't work under Windows. +# Test client/server with on demand activation. # -if TestUtil.isWin32() == 0 and TestUtil.protocol != "ssl": +server = os.path.join(testdir, "server") +client = os.path.join(testdir, "client") - server = os.path.join(testdir, "server") - client = os.path.join(testdir, "client") +if TestUtil.protocol == "ssl": + targets = "ssl" +else: + targets = "" - print "registering server with icepack...", - IcePackAdmin.addServer(toplevel, "server", os.path.join(testdir, "simple_server.xml"), server, "", ""); - print "ok" +print "registering server with icepack...", +IcePackAdmin.addServer(toplevel, "server", os.path.join(testdir, "simple_server.xml"), server, "", targets); +print "ok" - print "testing adapter registration...", - hasTestAdapter = 0; - icePackAdminPipe = IcePackAdmin.listAdapters(toplevel); - for adaptername in icePackAdminPipe.xreadlines(): - if adaptername.strip() == "TestAdapter": - hasTestAdapter = 1 - - if hasTestAdapter == 0: - print "failed!" - TestUtil.killServers() - sys.exit(1) - - icePackStatus = icePackAdminPipe.close() - if icePackStatus: - TestUtil.killServers() - sys.exit(1) - - print "ok" - - updatedClientOptions = TestUtil.clientOptions.replace("TOPLEVELDIR", toplevel) + additionalOptions - - print "starting client...", - clientPipe = os.popen(client + updatedClientOptions) - print "ok" - - for output in clientPipe.xreadlines(): - print output, - - clientStatus = clientPipe.close() - if clientStatus: - TestUtil.killServers() - sys.exit(1) +updatedClientOptions = TestUtil.clientOptions.replace("TOPLEVELDIR", toplevel) + additionalOptions + +print "starting client...", +clientPipe = os.popen(client + updatedClientOptions) +print "ok" + +for output in clientPipe.xreadlines(): + print output, - print "unregister server with icepack...", - IcePackAdmin.removeServer(toplevel, "server"); - print "ok" +clientStatus = clientPipe.close() +if clientStatus: + TestUtil.killServers() + sys.exit(1) + +print "unregister server with icepack...", +IcePackAdmin.removeServer(toplevel, "server"); +print "ok" IcePackAdmin.shutdownIcePack(toplevel, icePackPipe) diff --git a/cpp/test/IcePack/simple/simple_server.xml b/cpp/test/IcePack/simple/simple_server.xml index 9b2268fb7c1..535ded622b5 100644 --- a/cpp/test/IcePack/simple/simple_server.xml +++ b/cpp/test/IcePack/simple/simple_server.xml @@ -11,4 +11,15 @@ </properties> </target> + <target name="ssl"> + <properties> + <property name="Ice.Plugin.IceSSL" value="IceSSL:create"/> + <property name="Ice.Default.Protocol" value="ssl"/> + <property name="IceSSL.Client.CertPath" location="../../../certs"/> + <property name="IceSSL.Client.Config" value="client_sslconfig.xml"/> + <property name="IceSSL.Server.CertPath" location="../../../certs"/> + <property name="IceSSL.Server.Config" value="server_sslconfig.xml"/> + </properties> + </target> + </server>
\ No newline at end of file |