diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2014-08-19 13:10:29 -0230 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2014-08-19 13:10:29 -0230 |
commit | c6d20e1e1afc75f8bd889c093ccbffb247ec30cb (patch) | |
tree | 19443a7e7263ce1d715dad261b4574942c419552 /cpp/test/Ice/proxy/AllTests.cpp | |
parent | Fixed (ICE-5592) - Add IceSSL.FindCert for OS X and Windows (diff) | |
download | ice-c6d20e1e1afc75f8bd889c093ccbffb247ec30cb.tar.bz2 ice-c6d20e1e1afc75f8bd889c093ccbffb247ec30cb.tar.xz ice-c6d20e1e1afc75f8bd889c093ccbffb247ec30cb.zip |
ICE-3492 handle improper settings for timeout values
Diffstat (limited to 'cpp/test/Ice/proxy/AllTests.cpp')
-rw-r--r-- | cpp/test/Ice/proxy/AllTests.cpp | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/cpp/test/Ice/proxy/AllTests.cpp b/cpp/test/Ice/proxy/AllTests.cpp index 34754f816b7..ce615ab82d8 100644 --- a/cpp/test/Ice/proxy/AllTests.cpp +++ b/cpp/test/Ice/proxy/AllTests.cpp @@ -461,6 +461,88 @@ allTests(const Ice::CommunicatorPtr& communicator) test(base->ice_encodingVersion(Ice::Encoding_1_0)->ice_getEncodingVersion() == Ice::Encoding_1_0); test(base->ice_encodingVersion(Ice::Encoding_1_1)->ice_getEncodingVersion() == Ice::Encoding_1_1); test(base->ice_encodingVersion(Ice::Encoding_1_0)->ice_getEncodingVersion() != Ice::Encoding_1_1); + + try + { + base->ice_timeout(0); + test(false); + } + catch(const IceUtil::IllegalArgumentException&) + { + } + + try + { + base->ice_timeout(-1); + } + catch(const IceUtil::IllegalArgumentException&) + { + test(false); + } + + try + { + base->ice_timeout(-2); + test(false); + } + catch(const IceUtil::IllegalArgumentException&) + { + } + + try + { + base->ice_invocationTimeout(0); + test(false); + } + catch(const IceUtil::IllegalArgumentException&) + { + } + + try + { + base->ice_invocationTimeout(-1); + } + catch(const IceUtil::IllegalArgumentException&) + { + test(false); + } + + try + { + base->ice_invocationTimeout(-2); + test(false); + } + catch(const IceUtil::IllegalArgumentException&) + { + } + + try + { + base->ice_locatorCacheTimeout(0); + } + catch(const IceUtil::IllegalArgumentException&) + { + test(false); + } + + try + { + base->ice_locatorCacheTimeout(-1); + } + catch(const IceUtil::IllegalArgumentException&) + { + test(false); + } + + try + { + base->ice_locatorCacheTimeout(-2); + test(false); + } + catch(const IceUtil::IllegalArgumentException&) + { + } + cout << "ok" << endl; cout << "testing proxy comparison... " << flush; |