summaryrefslogtreecommitdiff
path: root/python/test/Ice/ami/AllTests.py
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2018-11-13 15:52:14 -0500
committerBernard Normier <bernard@zeroc.com>2018-11-13 15:52:14 -0500
commita5854cfd05fa6aa5b7cc50ecbfcc9336fb32412c (patch)
tree58b9f74f2132985fe15913f1a7f65e82121b8eba /python/test/Ice/ami/AllTests.py
parentFix failure related to Slice Scanner fixes (diff)
downloadice-a5854cfd05fa6aa5b7cc50ecbfcc9336fb32412c.tar.bz2
ice-a5854cfd05fa6aa5b7cc50ecbfcc9336fb32412c.tar.xz
ice-a5854cfd05fa6aa5b7cc50ecbfcc9336fb32412c.zip
More bidir tests. Fixes #51.
Diffstat (limited to 'python/test/Ice/ami/AllTests.py')
-rw-r--r--python/test/Ice/ami/AllTests.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/python/test/Ice/ami/AllTests.py b/python/test/Ice/ami/AllTests.py
index a85a640dab5..9624bc6c786 100644
--- a/python/test/Ice/ami/AllTests.py
+++ b/python/test/Ice/ami/AllTests.py
@@ -13,6 +13,17 @@ def test(b):
if not b:
raise RuntimeError('test assertion failed')
+class PingReplyI(Test.PingReply):
+ def __init__(self):
+ self._received = False
+
+ def reply(self, current=None):
+ self._received = True
+
+ def checkReceived(self):
+ return self._received
+
+
class CallbackBase:
def __init__(self):
self._called = False
@@ -1399,6 +1410,21 @@ def allTestsFuture(helper, communicator, collocated):
p.opWithUEAsync(ctx).add_done_callback(cb.opWithUE)
cb.check()
+ #
+ # TODO: test add_done_callback_async
+ #
+
+ if not collocated:
+ adapter = communicator.createObjectAdapter("")
+ replyI = PingReplyI()
+ reply = Test.PingReplyPrx.uncheckedCast(adapter.addWithUUID(replyI))
+ adapter.activate()
+
+ p.ice_getConnection().setAdapter(adapter)
+ p.pingBiDir(reply)
+ test(replyI.checkReceived())
+ adapter.destroy()
+
print("ok")
sys.stdout.write("testing local exceptions... ")