diff options
Diffstat (limited to 'cpp/test/Ice/operations/ServerAMD.cpp')
-rw-r--r-- | cpp/test/Ice/operations/ServerAMD.cpp | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/cpp/test/Ice/operations/ServerAMD.cpp b/cpp/test/Ice/operations/ServerAMD.cpp index 64fd3479220..2fae05b708d 100644 --- a/cpp/test/Ice/operations/ServerAMD.cpp +++ b/cpp/test/Ice/operations/ServerAMD.cpp @@ -34,36 +34,23 @@ main(int argc, char* argv[]) Ice::registerIceSSL(); #endif - int status; - Ice::CommunicatorPtr communicator; - try { Ice::InitializationData initData; initData.properties = Ice::createProperties(argc, argv); + // + // Its possible to have batch oneway requests dispatched after + // the adapter is deactivated due to thread scheduling so we + // supress this warning. + // initData.properties->setProperty("Ice.Warn.Dispatch", "0"); - communicator = ICE_COMMUNICATOR_HOLDER_RELEASE(Ice::initialize(argc, argv, initData)); - status = run(argc, argv, communicator); + Ice::CommunicatorHolder ich = Ice::initialize(argc, argv, initData); + return run(argc, argv, ich.communicator()); } catch(const Ice::Exception& ex) { cerr << ex << endl; - status = EXIT_FAILURE; + return EXIT_FAILURE; } - - if(communicator) - { - try - { - communicator->destroy(); - } - catch(const Ice::Exception& ex) - { - cerr << ex << endl; - status = EXIT_FAILURE; - } - } - - return status; } |