Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

Commit

Permalink
Make tests more reliable
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent Michel authored and vxgmichel committed Jan 31, 2017
1 parent b3b0531 commit 34e6cdd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def test_read_attribute(tango_test, readable_attribute):
# 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":
if readable_attribute in ["string_image_ro", "string_spectrum_ro"]:
sleep(0.05)
tango_test.read_attribute(readable_attribute, wait=True)

Expand Down
8 changes: 5 additions & 3 deletions tests/test_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,10 @@ def callback(evt):
"attr", EventType.CHANGE_EVENT, callback, wait=True)
event_device.command_inout("send_event", wait=True)
# Wait for tango event
event_device.read_attribute("state", wait=True)
event_device.read_attribute("state", wait=True)
event_device.read_attribute("state", wait=True)
retries = 10
for _ in range(retries):
event_device.read_attribute("state", wait=True)
if len(results) > 1:
break
# Test the event values
assert results == [0., 1.]

0 comments on commit 34e6cdd

Please sign in to comment.