summaryrefslogtreecommitdiff
path: root/py/test/Ice/exceptions/AllTests.py
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 /py/test/Ice/exceptions/AllTests.py
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 'py/test/Ice/exceptions/AllTests.py')
-rw-r--r--py/test/Ice/exceptions/AllTests.py35
1 files changed, 34 insertions, 1 deletions
diff --git a/py/test/Ice/exceptions/AllTests.py b/py/test/Ice/exceptions/AllTests.py
index 4cdd3915369..370bfd5edb1 100644
--- a/py/test/Ice/exceptions/AllTests.py
+++ b/py/test/Ice/exceptions/AllTests.py
@@ -7,7 +7,7 @@
#
# **********************************************************************
-import Ice, Test, threading, sys
+import Ice, Test, threading, sys, array
def test(b):
if not b:
@@ -688,6 +688,39 @@ def allTests(communicator):
print("ok")
+
+ sys.stdout.write("testing memory limit marshal exception...");
+ sys.stdout.flush();
+
+ try:
+ thrower.throwMemoryLimitException(array.array('B'));
+ test(False)
+ except Ice.UnknownLocalException:
+ pass
+ except:
+ print(sys.exc_info())
+ test(False)
+
+ try:
+ thrower.throwMemoryLimitException(array.array('B', (0 for x in xrange(20 * 1024)))) # 20KB
+ test(False)
+ except Ice.MemoryLimitException:
+ pass
+ except:
+ test(False)
+
+ try:
+ thrower.end_throwMemoryLimitException(
+ thrower.begin_throwMemoryLimitException(array.array('B', (0 for x in xrange(20 * 1024))))) # 20KB
+ test(False)
+ except Ice.MemoryLimitException:
+ pass
+ except:
+ test(False)
+
+ print("ok");
+
+
sys.stdout.write("catching object not exist exception... ")
sys.stdout.flush()