diff options
author | Jose <jose@zeroc.com> | 2016-10-11 16:16:32 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2016-10-11 16:16:32 +0200 |
commit | e659399c9fce6fc56006789120e3b90a9134574f (patch) | |
tree | 9a47a3da29acf5598ed853e1be0c7651dc0ff133 /cpp/test/Ice/exceptions/AllTests.cpp | |
parent | Fixed ICE-7346 - removed lmdb dependency, set cppflags instead if necessary (diff) | |
parent | Fixed typo (diff) | |
download | ice-e659399c9fce6fc56006789120e3b90a9134574f.tar.bz2 ice-e659399c9fce6fc56006789120e3b90a9134574f.tar.xz ice-e659399c9fce6fc56006789120e3b90a9134574f.zip |
Merge remote-tracking branch 'origin/3.6'
Conflicts:
README.md
android/build.gradle
android/gradle.properties
android/gradle/wrapper/gradle-wrapper.properties
config/Make.common.rules
config/PropertyNames.xml
cpp/BuildInstructionsLinux.md
cpp/BuildInstructionsOSX.md
cpp/BuildInstructionsWinRT.md
cpp/BuildInstructionsWindows.md
cpp/config/Make.rules
cpp/config/Make.rules.mak
cpp/include/IceUtil/Config.h
cpp/include/Slice/PythonUtil.h
cpp/include/Slice/RubyUtil.h
cpp/include/Slice/Util.h
cpp/src/Ice/DynamicLibrary.cpp
cpp/src/Ice/PropertyNames.cpp
cpp/src/Ice/PropertyNames.h
cpp/src/Ice/winrt/StreamEndpointI.cpp
cpp/src/IceGrid/IceGridDB.cpp
cpp/src/IceGrid/Util.cpp
cpp/src/IceUtil/FileUtil.cpp
cpp/src/IceUtil/FileUtil.h
cpp/src/Makefile
cpp/src/Slice/Util.cpp
cpp/src/slice2cs/Gen.cpp
cpp/src/slice2freeze/Main.cpp
cpp/src/slice2freezej/Main.cpp
cpp/src/slice2html/Makefile
cpp/src/slice2html/Makefile.mak
cpp/src/slice2java/Main.cpp
cpp/test/Ice/exceptions/AllTests.cpp
cpp/test/Ice/facets/AllTests.cpp
cpp/test/Ice/info/AllTests.cpp
cpp/test/Ice/location/AllTests.cpp
cpp/test/Ice/properties/run.py
cpp/test/Ice/timeout/AllTests.cpp
cpp/test/IceGrid/noRestartUpdate/AllTests.cpp
cpp/test/IceStorm/stress/run.py
cpp/test/TestSuite/10.0/Package.appxmanifest
cpp/test/TestSuite/10.0/TestSuite.vcxproj
cpp/test/TestSuite/10.0/TestSuite.vcxproj.filters
cpp/test/TestSuite/10.0/TestSuite_TemporaryKey.pfx
cpp/test/TestSuite/8.0/TestSuite.vcxproj
cpp/test/TestSuite/8.0/TestSuite_TemporaryKey.pfx
csharp/BuildInstructions.md
csharp/src/Ice/PropertyNames.cs
csharp/src/IceLocatorDiscovery/PluginI.cs
java/BuildInstructions.md
java/Makefile
java/Makefile.mak
java/src/Glacier2/src/main/java/Glacier2/Application.java
java/src/Glacier2/src/main/java/Glacier2/SessionFactoryHelper.java
java/src/Glacier2/src/main/java/Glacier2/SessionHelper.java
java/src/Ice/src/main/java/Ice/Object.java
java/src/Ice/src/main/java/Ice/ObjectImpl.java
java/src/Ice/src/main/java/IceInternal/PropertyNames.java
java/src/Ice/src/main/java/IceSSL/Plugin.java
java/src/Ice/src/main/java/IceSSL/PluginFactory.java
java/src/Ice/src/main/java/IceUtil/Cache.java
java/src/IceGridGUI/build.gradle
java/src/IceGridGUI/src/main/java/IceGridGUI/SimpleInternalFrame.java
java/src/IceGridGUI/src/main/java/IceGridGUI/Utils.java
java/test/build.gradle
java/test/ejb/README.md
js/src/Ice/PropertyNames.js
js/src/Ice/browser/TimerUtil.js
js/src/Ice/browser/WSTransceiver.js
js/test/Common/TestCases.json
js/test/Common/Worker.js
objective-c/include/objc/Ice/Config.h
objective-c/src/Ice/CommunicatorI.mm
php/BuildInstructionsLinuxOSX.md
php/BuildInstructionsWindows.md
php/config/Make.rules.mak.php
php/src/php7/IcePHP.rc
python/BuildInstructionsLinuxOSX.md
python/BuildInstructionsWindows.md
python/Makefile
python/modules/IcePy/Slice.cpp
python/test/Slice/import/run.py
ruby/BuildInstructionsLinuxOSX.md
ruby/BuildInstructionsWindows.md
ruby/config/Make.rules
ruby/src/IceRuby/Slice.cpp
scripts/TestController.py
scripts/TestUtil.py
slice/Ice/Communicator.ice
slice/Ice/Instrumentation.ice
slice/IceLocatorDiscovery/IceLocatorDiscovery.ice
Diffstat (limited to 'cpp/test/Ice/exceptions/AllTests.cpp')
-rw-r--r-- | cpp/test/Ice/exceptions/AllTests.cpp | 221 |
1 files changed, 115 insertions, 106 deletions
diff --git a/cpp/test/Ice/exceptions/AllTests.cpp b/cpp/test/Ice/exceptions/AllTests.cpp index 46c3ce7ae9a..caa960b8938 100644 --- a/cpp/test/Ice/exceptions/AllTests.cpp +++ b/cpp/test/Ice/exceptions/AllTests.cpp @@ -501,147 +501,156 @@ allTests(const Ice::CommunicatorPtr& communicator) } localOAEndpoint = ostr.str(); } +#ifdef ICE_OS_WINRT + bool winrt = true; +#else + bool winrt = false; +#endif - cout << "testing object adapter registration exceptions... " << flush; + if(!winrt || (communicator->getProperties()->getProperty("Ice.Default.Protocol") != "ssl" && + communicator->getProperties()->getProperty("Ice.Default.Protocol") != "wss")) { - Ice::ObjectAdapterPtr first; - try - { - first = communicator->createObjectAdapter("TestAdapter0"); - test(false); - } - catch(const Ice::InitializationException& ex) + cout << "testing object adapter registration exceptions... " << flush; { - if(printException) + Ice::ObjectAdapterPtr first; + try { - Ice::Print printer(communicator->getLogger()); - printer << ex; + first = communicator->createObjectAdapter("TestAdapter0"); + test(false); + } + catch(const Ice::InitializationException& ex) + { + if(printException) + { + Ice::Print printer(communicator->getLogger()); + printer << ex; + } + // Expected } - // Expected - } - communicator->getProperties()->setProperty("TestAdapter0.Endpoints", localOAEndpoint); - first = communicator->createObjectAdapter("TestAdapter0"); - try - { - Ice::ObjectAdapterPtr second = communicator->createObjectAdapter("TestAdapter0"); - test(false); - } - catch(const Ice::AlreadyRegisteredException& ex) - { - if(printException) + communicator->getProperties()->setProperty("TestAdapter0.Endpoints", localOAEndpoint); + first = communicator->createObjectAdapter("TestAdapter0"); + try { - Ice::Print printer(communicator->getLogger()); - printer << ex; + Ice::ObjectAdapterPtr second = communicator->createObjectAdapter("TestAdapter0"); + test(false); } + catch(const Ice::AlreadyRegisteredException& ex) + { + if(printException) + { + Ice::Print printer(communicator->getLogger()); + printer << ex; + } - // Expected - } + // Expected + } - try - { - Ice::ObjectAdapterPtr second = - communicator->createObjectAdapterWithEndpoints("TestAdapter0", "ssl -h foo -p 12011"); - test(false); - } - catch(const Ice::AlreadyRegisteredException& ex) - { - if(printException) + try { - Ice::Print printer(communicator->getLogger()); - printer << ex; + Ice::ObjectAdapterPtr second = + communicator->createObjectAdapterWithEndpoints("TestAdapter0", "ssl -h foo -p 12011"); + test(false); } + catch(const Ice::AlreadyRegisteredException& ex) + { + if(printException) + { + Ice::Print printer(communicator->getLogger()); + printer << ex; + } - // Expected. + // Expected. + } + first->deactivate(); } - first->deactivate(); - } - cout << "ok" << endl; + cout << "ok" << endl; - cout << "testing servant registration exceptions... " << flush; - { - communicator->getProperties()->setProperty("TestAdapter1.Endpoints", localOAEndpoint); - Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter1"); - Ice::ObjectPtr obj = ICE_MAKE_SHARED(EmptyI); - adapter->add(obj, Ice::stringToIdentity("x")); - try + cout << "testing servant registration exceptions... " << flush; { + communicator->getProperties()->setProperty("TestAdapter1.Endpoints", localOAEndpoint); + Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter1"); + Ice::ObjectPtr obj = ICE_MAKE_SHARED(EmptyI); adapter->add(obj, Ice::stringToIdentity("x")); - test(false); - } - catch(const Ice::AlreadyRegisteredException& ex) - { - if(printException) + try { - Ice::Print printer(communicator->getLogger()); - printer << ex; + adapter->add(obj, Ice::stringToIdentity("x")); + test(false); + } + catch(const Ice::AlreadyRegisteredException& ex) + { + if(printException) + { + Ice::Print printer(communicator->getLogger()); + printer << ex; + } } - } - try - { - adapter->add(obj, Ice::stringToIdentity("")); - } - catch(const Ice::IllegalIdentityException& ex) - { - test(ex.id.name == ""); - if(printException) + try { - Ice::Print printer(communicator->getLogger()); - printer << ex; + adapter->add(obj, Ice::stringToIdentity("")); + } + catch(const Ice::IllegalIdentityException& ex) + { + test(ex.id.name == ""); + if(printException) + { + Ice::Print printer(communicator->getLogger()); + printer << ex; + } } - } - try - { - adapter->add(0, Ice::stringToIdentity("x")); - } - catch(const Ice::IllegalServantException& ex) - { - if(printException) + try { - Ice::Print printer(communicator->getLogger()); - printer << ex; + adapter->add(0, Ice::stringToIdentity("x")); + } + catch(const Ice::IllegalServantException& ex) + { + if(printException) + { + Ice::Print printer(communicator->getLogger()); + printer << ex; + } } - } - adapter->remove(Ice::stringToIdentity("x")); - try - { adapter->remove(Ice::stringToIdentity("x")); - test(false); - } - catch(const Ice::NotRegisteredException& ex) - { - if(printException) + try { - Ice::Print printer(communicator->getLogger()); - printer << ex; + adapter->remove(Ice::stringToIdentity("x")); + test(false); + } + catch(const Ice::NotRegisteredException& ex) + { + if(printException) + { + Ice::Print printer(communicator->getLogger()); + printer << ex; + } } - } - adapter->deactivate(); - } - cout << "ok" << endl; + adapter->deactivate(); + } + cout << "ok" << endl; - cout << "testing servant locator registrations exceptions... " << flush; - { - communicator->getProperties()->setProperty("TestAdapter2.Endpoints", localOAEndpoint); - Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter2"); - Ice::ServantLocatorPtr loc = ICE_MAKE_SHARED(ServantLocatorI); - adapter->addServantLocator(loc, "x"); - try + cout << "testing servant locator registrations exceptions... " << flush; { + communicator->getProperties()->setProperty("TestAdapter2.Endpoints", localOAEndpoint); + Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter2"); + Ice::ServantLocatorPtr loc = ICE_MAKE_SHARED(ServantLocatorI); adapter->addServantLocator(loc, "x"); - test(false); - } - catch(const Ice::AlreadyRegisteredException&) - { - } + try + { + adapter->addServantLocator(loc, "x"); + test(false); + } + catch(const Ice::AlreadyRegisteredException&) + { + } - adapter->deactivate(); + adapter->deactivate(); + } + cout << "ok" << endl; } - cout << "ok" << endl; cout << "testing value factory registration exception... " << flush; { |