diff options
author | Benoit Foucher <benoit@zeroc.com> | 2013-07-04 11:20:07 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2013-07-04 11:20:07 +0200 |
commit | 0df052034b03907de02d8eac162e84e5ba50bfd5 (patch) | |
tree | f424142a198431b2a8981bfaebe79410ef4f5481 /cpp/test/Ice/exceptions/AllTests.cpp | |
parent | Fixed ICE-5340 - FileLock jlint errors in android (diff) | |
download | ice-0df052034b03907de02d8eac162e84e5ba50bfd5.tar.bz2 ice-0df052034b03907de02d8eac162e84e5ba50bfd5.tar.xz ice-0df052034b03907de02d8eac162e84e5ba50bfd5.zip |
Fixed ICE-5369 - fixed asserting on AMD response if memory limit exception was raised
Diffstat (limited to 'cpp/test/Ice/exceptions/AllTests.cpp')
-rw-r--r-- | cpp/test/Ice/exceptions/AllTests.cpp | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/cpp/test/Ice/exceptions/AllTests.cpp b/cpp/test/Ice/exceptions/AllTests.cpp index 8834c89ecad..caf331f30ff 100644 --- a/cpp/test/Ice/exceptions/AllTests.cpp +++ b/cpp/test/Ice/exceptions/AllTests.cpp @@ -1343,6 +1343,53 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) cout << "ok" << endl; } + { + cout << "testing memory limit marshal exception..." << flush; + try + { + thrower->throwMemoryLimitException(Ice::ByteSeq()); + test(collocated); + } + catch(const Ice::UnknownLocalException&) + { + } + catch(...) + { + test(false); + } + + try + { + thrower->throwMemoryLimitException(Ice::ByteSeq(20 * 1024)); // 20KB + test(collocated); + } + catch(const Ice::MemoryLimitException& ex) + { + } + catch(...) + { + test(false); + } + + if(!collocated) + { + try + { + thrower->end_throwMemoryLimitException( + thrower->begin_throwMemoryLimitException(Ice::ByteSeq(20 * 1024))); // 20KB + test(false); + } + catch(const Ice::MemoryLimitException&) + { + } + catch(...) + { + test(false); + } + } + cout << "ok" << endl; + } + cout << "catching object not exist exception... " << flush; Ice::Identity id = communicator->stringToIdentity("does not exist"); |