[pytango] 114/122: Make client tests more reliable
Sandor Bodo-Merle
sbodomerle-guest at moszumanska.debian.org
Thu Sep 28 19:18:24 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 67e7b3479dec59c033752bd58b13960a50e91d07
Author: Vincent Michel <vincent.michel at maxlab.lu.se>
Date: Tue Jan 17 16:43:16 2017 +0100
Make client tests more reliable
---
tests/test_client.py | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/tests/test_client.py b/tests/test_client.py
index ad9b7ed..5c766a5 100644
--- a/tests/test_client.py
+++ b/tests/test_client.py
@@ -130,13 +130,14 @@ def get_proxy(host, port, device, green_mode):
return device_proxy_map[green_mode](access)
-def wait_for_proxy(host, proc, device, green_mode, retries=50, delay=0.1):
+def wait_for_proxy(host, proc, device, green_mode, retries=100, delay=0.01):
for i in range(retries):
ports = get_ports(proc.pid)
- for port in ports:
+ if ports:
try:
- proxy = get_proxy(host, port, device, green_mode)
+ proxy = get_proxy(host, ports[0], device, green_mode)
proxy.ping()
+ proxy.state()
return proxy
except DevFailed:
pass
@@ -200,6 +201,11 @@ def test_info(tango_test):
def test_read_attribute(tango_test, readable_attribute):
"Check that readable attributes can be read"
+ # This is a hack:
+ # Without this sleep, the following error is very likely to be raised:
+ # -> MARSHAL CORBA system exception: MARSHAL_PassEndOfMessage
+ if readable_attribute == "string_image_ro":
+ sleep(0.05)
tango_test.read_attribute(readable_attribute, wait=True)
--
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