summaryrefslogtreecommitdiff
path: root/java/test/Ice/exceptions/AllTests.java
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2013-07-04 11:20:07 +0200
committerBenoit Foucher <benoit@zeroc.com>2013-07-04 11:20:07 +0200
commit0df052034b03907de02d8eac162e84e5ba50bfd5 (patch)
treef424142a198431b2a8981bfaebe79410ef4f5481 /java/test/Ice/exceptions/AllTests.java
parentFixed ICE-5340 - FileLock jlint errors in android (diff)
downloadice-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 'java/test/Ice/exceptions/AllTests.java')
-rw-r--r--java/test/Ice/exceptions/AllTests.java51
1 files changed, 51 insertions, 0 deletions
diff --git a/java/test/Ice/exceptions/AllTests.java b/java/test/Ice/exceptions/AllTests.java
index 88f6a4271fd..e45abf76b64 100644
--- a/java/test/Ice/exceptions/AllTests.java
+++ b/java/test/Ice/exceptions/AllTests.java
@@ -1739,6 +1739,57 @@ public class AllTests
out.println("ok");
}
+ out.print("testing memory limit marshal exception...");
+ out.flush();
+ {
+ try
+ {
+ thrower.throwMemoryLimitException(null);
+ test(collocated);
+ }
+ catch(Ice.UnknownLocalException ex)
+ {
+ }
+ catch(Throwable ex)
+ {
+ ex.printStackTrace();
+ test(false);
+ }
+
+ try
+ {
+ thrower.throwMemoryLimitException(new byte[20 * 1024]); // 20KB
+ test(collocated);
+ }
+ catch(Ice.MemoryLimitException ex)
+ {
+ }
+ catch(Throwable ex)
+ {
+ ex.printStackTrace();
+ test(false);
+ }
+
+ if(!collocated)
+ {
+ try
+ {
+ thrower.end_throwMemoryLimitException(
+ thrower.begin_throwMemoryLimitException(new byte[20 * 1024])); // 20KB
+ test(false);
+ }
+ catch(Ice.MemoryLimitException ex)
+ {
+ }
+ catch(Throwable ex)
+ {
+ ex.printStackTrace();
+ test(false);
+ }
+ }
+ }
+ out.println("ok");
+
out.print("catching object not exist exception... ");
out.flush();