summaryrefslogtreecommitdiff
path: root/python/test/Ice/acm/AllTests.py
diff options
context:
space:
mode:
authorJoe George <joe@zeroc.com>2015-12-23 14:48:40 -0500
committerJoe George <joe@zeroc.com>2015-12-24 10:01:11 -0500
commite84da5f580821cae8dab292e19cc1296c07a8ed5 (patch)
tree1e8783c55c7dccd5adda2b87b47b8a7c118a1147 /python/test/Ice/acm/AllTests.py
parentFixes related to EnableSharedFromThis (diff)
downloadice-e84da5f580821cae8dab292e19cc1296c07a8ed5.tar.bz2
ice-e84da5f580821cae8dab292e19cc1296c07a8ed5.tar.xz
ice-e84da5f580821cae8dab292e19cc1296c07a8ed5.zip
ICE-6898 - "Delegate" functions for ACM callbacks
- Add delegate local interfaces CloseCallback and HeartbeatCallback and remove ConnectionCallback. - Replace setCallback by setCloseCallback and setHeartbeatCallback
Diffstat (limited to 'python/test/Ice/acm/AllTests.py')
-rw-r--r--python/test/Ice/acm/AllTests.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/python/test/Ice/acm/AllTests.py b/python/test/Ice/acm/AllTests.py
index 60844870090..816c9b94ab4 100644
--- a/python/test/Ice/acm/AllTests.py
+++ b/python/test/Ice/acm/AllTests.py
@@ -74,7 +74,7 @@ class LoggerI(Ice.Logger):
print(p)
self._messages = []
-class TestCase(threading.Thread, Ice.ConnectionCallback):
+class TestCase(threading.Thread):
def __init__(self, name, com):
threading.Thread.__init__(self)
self._name = name
@@ -128,7 +128,9 @@ class TestCase(threading.Thread, Ice.ConnectionCallback):
proxy = Test.TestIntfPrx.uncheckedCast(self._communicator.stringToProxy(
self._adapter.getTestIntf().ice_toString()))
try:
- proxy.ice_getConnection().setCallback(self)
+ proxy.ice_getConnection().setCloseCallback(lambda conn: self.closed(conn))
+ proxy.ice_getConnection().setHeartbeatCallback(lambda conn: self.heartbeat(conn))
+
self.runTestCase(self._adapter, proxy)
except Exception as ex:
self._msg = "unexpected exception:\n" + traceback.format_exc()