summaryrefslogtreecommitdiff
path: root/python/test/Ice/ami/TestI.py
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2017-02-09 16:31:31 -0800
committerMark Spruiell <mes@zeroc.com>2017-02-09 16:31:31 -0800
commitaf409fe78bdca7db6315ab0cc99ad063f8daecf7 (patch)
treeb0079f556247a14f43e77ca6a31cb42df019485b /python/test/Ice/ami/TestI.py
parentFixed enum-related warnings (diff)
downloadice-af409fe78bdca7db6315ab0cc99ad063f8daecf7.tar.bz2
ice-af409fe78bdca7db6315ab0cc99ad063f8daecf7.tar.xz
ice-af409fe78bdca7db6315ab0cc99ad063f8daecf7.zip
ICE-7560 - more AMI test fixes, renaming ConnectionClose enumerators
Diffstat (limited to 'python/test/Ice/ami/TestI.py')
-rw-r--r--python/test/Ice/ami/TestI.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/python/test/Ice/ami/TestI.py b/python/test/Ice/ami/TestI.py
index 53585189f29..75deb1d08b6 100644
--- a/python/test/Ice/ami/TestI.py
+++ b/python/test/Ice/ami/TestI.py
@@ -13,6 +13,7 @@ class TestIntfI(Test._TestIntfDisp):
def __init__(self):
self._cond = threading.Condition()
self._batchCount = 0
+ self._pending = []
def op(self, current=None):
pass
@@ -49,9 +50,30 @@ class TestIntfI(Test._TestIntfDisp):
def sleep(self, ms, current=None):
time.sleep(ms / 1000.0)
+ def startDispatch(self, current=None):
+ f = Ice.Future()
+ with self._cond:
+ self._pending.append(f)
+ return f
+
+ def finishDispatch(self, current=None):
+ with self._cond:
+ for f in self._pending:
+ f.set_result(None)
+ self._pending = []
+
def shutdown(self, current=None):
+ #
+ # Just in case a request arrived late.
+ #
+ with self._cond:
+ for f in self._pending:
+ f.set_result(None)
current.adapter.getCommunicator().shutdown()
+ def supportsAMD(self, current=None):
+ return True
+
def supportsFunctionalTests(self, current=None):
return False