diff options
author | Jose <jose@zeroc.com> | 2018-06-01 17:41:03 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2018-06-01 17:41:03 +0200 |
commit | cbe92e540a7f02f0bdf93192424bd119189365b7 (patch) | |
tree | 411c50dc0ae9c669d31a940b1b4903b5deac4f12 /cpp/test/IceGrid/replication/Server.cpp | |
parent | Fixed Util.py check for binary installation directory on Windows (diff) | |
download | ice-cbe92e540a7f02f0bdf93192424bd119189365b7.tar.bz2 ice-cbe92e540a7f02f0bdf93192424bd119189365b7.tar.xz ice-cbe92e540a7f02f0bdf93192424bd119189365b7.zip |
Do not use Ice::Application for Ice testsuite
Diffstat (limited to 'cpp/test/IceGrid/replication/Server.cpp')
-rw-r--r-- | cpp/test/IceGrid/replication/Server.cpp | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/cpp/test/IceGrid/replication/Server.cpp b/cpp/test/IceGrid/replication/Server.cpp index c1a1116d4e4..2046a002414 100644 --- a/cpp/test/IceGrid/replication/Server.cpp +++ b/cpp/test/IceGrid/replication/Server.cpp @@ -9,24 +9,23 @@ #include <Ice/Ice.h> #include <TestI.h> -#include <TestCommon.h> +#include <TestHelper.h> using namespace std; -class Server : public Ice::Application +class Server : public Test::TestHelper { public: - virtual int run(int argc, char* argv[]); + void run(int, char**); }; -int -Server::run(int, char**) +void +Server::run(int argc, char** argv) { - Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("TestAdapter"); - Ice::ObjectPtr object = new TestI(); - adapter->add(object, Ice::stringToIdentity(communicator()->getProperties()->getProperty("Identity"))); - shutdownOnInterrupt(); + Ice::CommunicatorHolder communicator = initialize(argc, argv); + Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); + adapter->add(new TestI(), Ice::stringToIdentity(communicator->getProperties()->getProperty("Identity"))); try { adapter->activate(); @@ -34,14 +33,7 @@ Server::run(int, char**) catch(const Ice::ObjectAdapterDeactivatedException&) { } - communicator()->waitForShutdown(); - ignoreInterrupt(); - return EXIT_SUCCESS; + communicator->waitForShutdown(); } -int -main(int argc, char* argv[]) -{ - Server app; - return app.main(argc, argv); -} +DEFINE_TEST(Server) |