Skip to content

enh(core): do not restart multi_config_controller when the config does not change

Flavien BRIDAULT requested to merge enh-multi_config_controller-set-config into dev

Description

The multi_config_controller recently introduced in sight allows to launch a config set by a slot call. The current behaviour launches the config anytime it is set, and when the update() is called. I don't think it was wanted by design and I propose in this mr to not relaunch a config if it is the same. This avoids useless stop/start sequences, especially when a single service drives several multi_config_controller. If necessary, it is still possible to stop/start the config by calling the update() slot explicitly, so I think we should cover all cases with this change.

How to test it?

A unit-test has been extended to verify the new behaviour. It was also corrected to succeed if launched individually; it relies on unique service ids that use an internal counter. This counter can have a different value depending on the previous tests launched.

Edited by Flavien BRIDAULT

Merge request reports