Skip to content

Conversation

@cmft
Copy link
Owner

@cmft cmft commented Jan 18, 2017

This PR is for testing the fixing of the testsuite

cmft added 4 commits January 18, 2017 13:29
Some tests were commented out because they break test isolation.

The fix of taurus-org#365 may have solved the root cause of this, so reenable them.
In some conditions (e.g. while testing in travis) a race condition
makes some test involving DSs to fail (see taurus-org#261).

The ultimate cause is not yet clear but it seems related to reading
ocurring before the DS is ready.

Force sleep after DS starting as workaround and remove sleeps from
workaround for taurus-org#334 which seem redundant now.
In the past we observed random failures for this test:
~~~~~~~~~~~~~~~~~~~~~~~
FAIL: test_bgRole (...)
expected: (0, 255, 0)
got: (239, 240, 241)  # <-- these values change (unitialized garbage?)
~~~~~~~~~~~~~~~~~~~~~~~

The fix of taurus-org#365 seems to fix that, so reenable the test.
The test-timer test is not deterministic. It may fail occasionally
(e.g. if the machine is overloaded) cause testsuite failures that
interfere with CI.

Exclude this test in travis.
cmft added 22 commits January 18, 2017 15:26
Implement a processEvents method that loops several times over
QApplication.processEvents and use it in the tests to try to
avoid random tests failures in taurus.qt tests.
AttributeTestCase.write_read_attr helper uses attr.write(with_read=True)
for reading the value. This may lead to reading None in some cases
 (e.g. attr.isUsingEvents() returns True) and cause the test to fail.

Do separated write and read (without cache) instead.
@cpascual
Copy link

The repeated tests failed 2 times of ~120. In both cases, the error was from the same test (but a different property being tested):

In e58d856

FAIL: test_write_read_attr_26 (taurus.core.tango.test.test_tangoattribute.AttributeTestCase)

Testing write_read_attr(attrname='boolean_scalar', expected={'writable': True, 'alarms': [None, None], 'range': [None, None], 'warnings': [None, None], 'wvalue': False, 'rvalue': False, 'type': 3}, expected_attrv={'wvalue': False, 'w_value': False, 'rvalue': False, 'quality': <AttrQuality.ATTR_VALID: 0>, 'value': False}, setvalue=False)
(...)
AssertionError: rvalue for "boolean_scalar" should be False (got True)

and , in 599dec4

FAIL: test_write_read_attr_26 (taurus.core.tango.test.test_tangoattribute.AttributeTestCase)

Testing write_read_attr(attrname='boolean_scalar', expected={'writable': True, 'alarms': [None, None], 'range': [None, None], 'warnings': [None, None], 'wvalue': False, 'rvalue': False, 'type': 3}, expected_attrv={'wvalue': False, 'w_value': False, 'rvalue': False, 'quality': <AttrQuality.ATTR_VALID: 0>, 'value': False}, setvalue=False)
(...)
AssertionError: wvalue for "boolean_scalar" should be False (got True)

Even if it is still not perfect, the situation seems to have improved a lot.At least enough for applying the fixes in the official repo...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants