Skip to content

Fix cxx_fwd_att.cpp:749 occasional test failure (#384,#428)

Reynald Bourtembourg requested to merge github/fork/bourtemb/fix-384 into tango-9-lts

Added a sleep time after sending AddObjPolling command to the root device and before subscribing event on the forwarded device to give some time for the polling to start up correctly and changed the assertion cb.cb_err == 1 into cb.cb_err == 0.

The test failures we were experiencing before were due to the fact that sometimes (most of the times) an error event was sent with the following exception:

Severity = ERROR 
Error reason = API_NoDataYet
Desc : No data available in cache for attribute short_attr_rw
Origin : Device_3Impl::read_attributes_from_cache

Severity = ERROR 
Error reason = API_AttributeFailed
Desc : Failed to read_attribute on device test/debian8/10, attribute short_attr_rw
Origin : DeviceProxy::read_attribute()

And sometimes, no error event was sent because the polling had enough time to start up correctly on the root device. So there was already a value available in the cache. So the assertion (cb.cb_err == 1) was wrong in this last case because cb.cb_err was equal to 0.

Merge request reports

Loading