summaryrefslogtreecommitdiff
path: root/python/test
diff options
context:
space:
mode:
Diffstat (limited to 'python/test')
-rw-r--r--python/test/Ice/exceptions/AllTests.py2
-rw-r--r--python/test/Ice/objects/AllTests.py25
-rwxr-xr-xpython/test/Ice/objects/Collocated.py5
-rwxr-xr-xpython/test/Ice/objects/Server.py7
-rw-r--r--python/test/Ice/objects/Test.ice8
-rw-r--r--python/test/Ice/objects/TestI.py6
6 files changed, 50 insertions, 3 deletions
diff --git a/python/test/Ice/exceptions/AllTests.py b/python/test/Ice/exceptions/AllTests.py
index f876c844cae..fdfc2bddca6 100644
--- a/python/test/Ice/exceptions/AllTests.py
+++ b/python/test/Ice/exceptions/AllTests.py
@@ -483,6 +483,8 @@ def allTests(communicator):
test(False)
except Ice.ConnectionLostException:
pass
+ except Ice.UnknownLocalException:
+ pass
except:
test(False)
diff --git a/python/test/Ice/objects/AllTests.py b/python/test/Ice/objects/AllTests.py
index 7578f850ecf..a280939fe94 100644
--- a/python/test/Ice/objects/AllTests.py
+++ b/python/test/Ice/objects/AllTests.py
@@ -213,6 +213,31 @@ def allTests(communicator):
pass
print("ok")
+ sys.stdout.write("testing recursive type... ")
+ sys.stdout.flush()
+ top = Test.Recursive()
+ p = top;
+ depth = 0;
+ try:
+ while depth <= 1000:
+ p.v = Test.Recursive()
+ p = p.v;
+ if (depth < 10 and (depth % 10) == 0) or \
+ (depth < 1000 and (depth % 100) == 0) or \
+ (depth < 10000 and (depth % 1000) == 0) or \
+ (depth % 10000) == 0:
+ initial.setRecursive(top)
+ depth += 1
+ test(not initial.supportsClassGraphDepthMax())
+ except Ice.UnknownLocalException:
+ # Expected marshal exception from the server (max class graph depth reached)
+ pass
+ except Ice.UnknownException:
+ # Expected stack overflow from the server (Java only)
+ pass
+ initial.setRecursive(Test.Recursive())
+ print("ok")
+
sys.stdout.write("testing compact ID... ")
sys.stdout.flush()
try:
diff --git a/python/test/Ice/objects/Collocated.py b/python/test/Ice/objects/Collocated.py
index 845d56c4cea..2ee0bade6dd 100755
--- a/python/test/Ice/objects/Collocated.py
+++ b/python/test/Ice/objects/Collocated.py
@@ -32,7 +32,10 @@ def run(args, communicator):
return True
try:
- with Ice.initialize(sys.argv) as communicator:
+ initData = Ice.InitializationData()
+ initData.properties = Ice.createProperties(sys.argv)
+ initData.properties.setProperty("Ice.Warn.Dispatch", "0");
+ with Ice.initialize(sys.argv, initData) as communicator:
status = run(sys.argv, communicator)
except:
traceback.print_exc()
diff --git a/python/test/Ice/objects/Server.py b/python/test/Ice/objects/Server.py
index b4352d82b5d..40b9f273c1b 100755
--- a/python/test/Ice/objects/Server.py
+++ b/python/test/Ice/objects/Server.py
@@ -40,8 +40,11 @@ def run(args, communicator):
return True
try:
- with Ice.initialize(sys.argv) as communicator:
- status = run(sys.argv, communicator)
+ initData = Ice.InitializationData()
+ initData.properties = Ice.createProperties(sys.argv)
+ initData.properties.setProperty("Ice.Warn.Dispatch", "0");
+ with Ice.initialize(sys.argv, initData) as communicator:
+ status = run(sys.argv, communicator)
except:
traceback.print_exc()
status = False
diff --git a/python/test/Ice/objects/Test.ice b/python/test/Ice/objects/Test.ice
index e7464b00292..7d9cdba97c9 100644
--- a/python/test/Ice/objects/Test.ice
+++ b/python/test/Ice/objects/Test.ice
@@ -162,6 +162,11 @@ exception Ex
};
+class Recursive
+{
+ Recursive v;
+};
+
interface Initial
{
void shutdown();
@@ -172,6 +177,9 @@ interface Initial
E getE();
F getF();
+ void setRecursive(Recursive p);
+ bool supportsClassGraphDepthMax();
+
["marshaled-result"] B getMB();
["amd", "marshaled-result"] B getAMDMB();
diff --git a/python/test/Ice/objects/TestI.py b/python/test/Ice/objects/TestI.py
index 44d70a90d4c..8ce0c271081 100644
--- a/python/test/Ice/objects/TestI.py
+++ b/python/test/Ice/objects/TestI.py
@@ -125,6 +125,12 @@ class InitialI(Test.Initial):
def getF(self, current=None):
return self._f
+ def setRecursive(self, r, current):
+ pass
+
+ def supportsClassGraphDepthMax(self, current):
+ return True
+
def getMB(self, current):
return self._b1