Skip to content

DServer::add_obj_polling: Add objects to polling list also in nodb mode

Thomas Ives requested to merge fix-catch2-polling-attr into main

This allows a client to turn on attribute polling when in nodb mode.

The issue was that we only updated the polled_attr list as a side effect of sending a property update to the database. I have flipped the logic around to always update polled_attr and only have the actual sending of the properties to the database guarded by the "if using db" check.

To work with the event subscriptions, I have added a CallbackMock class template based on some work that Michal Liszcz did in !558 (closed) to try to reduce the amount of sleeping in the old/cxx tests. This should hopefully mean we can avoid sleeping in these new catch2 tests.

This MR has grown pretty big (sorry). Everything before 18a48978 (TangoTest::TestServer::stop: Warn with server output on test failure., 2024-02-13) is just fixes and additions to the Catch2 tests. After that we have the meat of the MR where we actually fix attribute polling in nodb mode. If it is too much to review I am happy to split things up.

TODO:

  • Check upd_obj_polling and rem_obj_polling work in nodb too
  • Investigate if there are any existing tests

Closes #910 (closed), #1220 (closed), #1221 (closed).

Edited by Thomas Ives

Merge request reports