You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
A clear and concise description of what the bug is.
ConfigChangeObserverTest.test_config_change_observer points a ConfigChangeObserver at a configuration, changes the configuration, then immediately checks that ConfigChangeObserver noticed the change. There isn't always time for this to happen. Sometimes the check is done before ConfigChangeObserver has had time to reach its next polling interval and load the new configuration from the file. This results in a spurious test failure.
To Reproduce
Steps to reproduce the behaviour:
Run the ConfigChangeObserverTest.test_config_change_observer repeatedly. Occasionally it fails. (Frequency of failures dependent on system configuration and current load.)
Expected behaviour
The test should pass every time.
Additional context
The simple but inefficient way to fix this is to introduce a fixed delay the the test between updating the configuration file and checking that the change has been registered. However, I have discovered that occasionally (rarely) this can take up to two seconds, and it would be inefficient to slow down every test run by two seconds for these rare cases. The test should poll for the change so it doesn't waste any time, with a fall-back time-out of two seconds or so, to catch genuine failures where ConfigChangeListenerreally doesn't register it.
The text was updated successfully, but these errors were encountered:
Describe the bug
A clear and concise description of what the bug is.
ConfigChangeObserverTest.test_config_change_observer
points aConfigChangeObserver
at a configuration, changes the configuration, then immediately checks thatConfigChangeObserver
noticed the change. There isn't always time for this to happen. Sometimes the check is done beforeConfigChangeObserver
has had time to reach its next polling interval and load the new configuration from the file. This results in a spurious test failure.To Reproduce
Steps to reproduce the behaviour:
Run the
ConfigChangeObserverTest.test_config_change_observer
repeatedly. Occasionally it fails. (Frequency of failures dependent on system configuration and current load.)Expected behaviour
The test should pass every time.
Additional context
The simple but inefficient way to fix this is to introduce a fixed delay the the test between updating the configuration file and checking that the change has been registered. However, I have discovered that occasionally (rarely) this can take up to two seconds, and it would be inefficient to slow down every test run by two seconds for these rare cases. The test should poll for the change so it doesn't waste any time, with a fall-back time-out of two seconds or so, to catch genuine failures where
ConfigChangeListener
really doesn't register it.The text was updated successfully, but these errors were encountered: