summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/exceptions/ServerAMD.cpp
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2015-12-11 18:00:31 -0500
committerBernard Normier <bernard@zeroc.com>2015-12-11 18:00:31 -0500
commita2dfe3a7cd457d0d4b38399ab0aca4f0335fb0c8 (patch)
tree979e304b6beb03bdceed36bee74edd5cabfa9add /cpp/test/Ice/exceptions/ServerAMD.cpp
parentFix Windows C++ tests build (diff)
downloadice-a2dfe3a7cd457d0d4b38399ab0aca4f0335fb0c8.tar.bz2
ice-a2dfe3a7cd457d0d4b38399ab0aca4f0335fb0c8.tar.xz
ice-a2dfe3a7cd457d0d4b38399ab0aca4f0335fb0c8.zip
Updated Ice::CommunicationHolder and simplified tests
Diffstat (limited to 'cpp/test/Ice/exceptions/ServerAMD.cpp')
-rw-r--r--cpp/test/Ice/exceptions/ServerAMD.cpp24
1 files changed, 4 insertions, 20 deletions
diff --git a/cpp/test/Ice/exceptions/ServerAMD.cpp b/cpp/test/Ice/exceptions/ServerAMD.cpp
index 8872ec6c584..f93fd0e2a2f 100644
--- a/cpp/test/Ice/exceptions/ServerAMD.cpp
+++ b/cpp/test/Ice/exceptions/ServerAMD.cpp
@@ -39,8 +39,6 @@ main(int argc, char* argv[])
#ifdef ICE_STATIC_LIBS
Ice::registerIceSSL();
#endif
- int status;
- Ice::CommunicatorPtr communicator;
try
{
@@ -54,27 +52,13 @@ main(int argc, char* argv[])
initData.properties->setProperty("TestAdapter2.MessageSizeMax", "0");
initData.properties->setProperty("TestAdapter3.Endpoints", "default -p 12012");
initData.properties->setProperty("TestAdapter3.MessageSizeMax", "1");
- 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;
}