[pytango] 70/122: Update test context
Sandor Bodo-Merle
sbodomerle-guest at moszumanska.debian.org
Thu Sep 28 19:18:19 UTC 2017
This is an automated email from the git hooks/post-receive script.
sbodomerle-guest pushed a commit to tag v9.2.1
in repository pytango.
commit 3d08e7dc767f80b181ece192801121df03990f10
Author: Vincent Michel <vincent.michel at maxlab.lu.se>
Date: Fri Oct 14 13:41:53 2016 +0200
Update test context
---
tango/test_context.py | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/tango/test_context.py b/tango/test_context.py
index 3139646..57e3372 100644
--- a/tango/test_context.py
+++ b/tango/test_context.py
@@ -75,7 +75,8 @@ class DeviceTestContext(object):
nodb = "#dbase=no"
command = "{0} {1} -ORBendPoint giop:tcp::{2} -file={3}"
- connect_time = 6.0
+ connect_timeout = 6.0
+ disconnect_timeout = connect_timeout
def __init__(self, device, device_cls=None, server_name=None,
instance_name=None, device_name=None, properties={},
@@ -154,7 +155,7 @@ class DeviceTestContext(object):
self.connect()
return self
- @retry(connect_time, [ConnectionFailed, DevFailed])
+ @retry(connect_timeout, [ConnectionFailed, DevFailed])
def connect(self):
if not self.thread.is_alive():
raise RuntimeError(
@@ -168,10 +169,12 @@ class DeviceTestContext(object):
"""Kill the server."""
if self.server:
self.server.command_inout('Kill')
- self.thread.join(timeout)
+ self.join(timeout)
os.unlink(self.db)
def join(self, timeout=None):
+ if timeout is None:
+ timeout = self.disconnect_timeout
self.thread.join(timeout)
def __enter__(self):
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pytango.git
More information about the debian-science-commits
mailing list