summaryrefslogtreecommitdiff
path: root/python/test/Ice/timeout/AllTests.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/test/Ice/timeout/AllTests.py')
-rw-r--r--python/test/Ice/timeout/AllTests.py17
1 files changed, 13 insertions, 4 deletions
diff --git a/python/test/Ice/timeout/AllTests.py b/python/test/Ice/timeout/AllTests.py
index 2a15d4c0fc0..e676e05dac6 100644
--- a/python/test/Ice/timeout/AllTests.py
+++ b/python/test/Ice/timeout/AllTests.py
@@ -55,6 +55,19 @@ def connect(prx):
return prx.ice_getConnection(); # Establish connection
def allTests(helper, communicator):
+ controller = Test.ControllerPrx.checkedCast(
+ communicator.stringToProxy("controller:{0}".format(helper.getTestEndpoint(num=1))))
+ test(controller != None)
+
+ try:
+ allTestsWithController(helper, communicator, controller)
+ except Exception:
+ # Ensure the adapter is not in the holding state when an unexpected exception occurs to prevent
+ # the test from hanging on exit in case a connection which disables timeouts is still opened.
+ controller.resumeAdapter()
+ raise
+
+def allTestsWithController(helper, communicator, controller):
sref = "timeout:{0}".format(helper.getTestEndpoint())
obj = communicator.stringToProxy(sref)
@@ -63,10 +76,6 @@ def allTests(helper, communicator):
timeout = Test.TimeoutPrx.checkedCast(obj)
test(timeout != None)
- controller = Test.ControllerPrx.checkedCast(
- communicator.stringToProxy("controller:{0}".format(helper.getTestEndpoint(num=1))))
- test(controller != None)
-
sys.stdout.write("testing connect timeout... ")
sys.stdout.flush()
#