1 //
2 // Copyright (c) ZeroC, Inc. All rights reserved.
3 //
4 
5 #include <Ice/Ice.h>
6 #include <TestHelper.h>
7 #include <TestI.h>
8 
9 using namespace std;
10 
11 class Server : public Test::TestHelper
12 {
13 public:
14 
15     void run(int, char**);
16 };
17 
18 void
run(int argc,char ** argv)19 Server::run(int argc, char** argv)
20 {
21     Ice::PropertiesPtr properties = createTestProperties(argc, argv);
22     //
23     // Its possible to have batch oneway requests dispatched after
24     // the adapter is deactivated due to thread scheduling so we
25     // supress this warning.
26     //
27     properties->setProperty("Ice.Warn.Dispatch", "0");
28 
29     Ice::CommunicatorHolder communicator = initialize(argc, argv, properties);
30     communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint());
31     Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter");
32     adapter->add(ICE_MAKE_SHARED(MyDerivedClassI), Ice::stringToIdentity("test"));
33     adapter->activate();
34     serverReady();
35     communicator->waitForShutdown();
36 }
37 
38 DEFINE_TEST(Server)
39