diff options
Diffstat (limited to 'python/test/Ice/ami/AllTests.py')
-rw-r--r-- | python/test/Ice/ami/AllTests.py | 26 |
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... ") |