[OVN][FT] Also update nb_cfg along with nb_cfg_timestamp
FT ``test_agent_updated_at_use_nb_cfg_timestamp`` updates "nb_cfg_timestamp" in Chassis_Private table and then checks if agent cache get's updated to the same value. But "ChassisAgentWriteEvent" which is responsible for updating AgentCache doesn't get triggered with updates on "nb_cfg_timestamp", so this patch proposes also to increment "nb_cfg" by 1 to trigger the Event as in general scenario timestamep get's updated along with nb_cfg. Closes-Bug: #1974149 Change-Id: I8889746ff2ee2629ee7c38ac162ea7c4d9ee0734
This commit is contained in:
@@ -474,6 +474,12 @@ class TestAgentMonitor(base.TestOVNFunctionalBase):
|
||||
nb_cfg_timestamp = timestamp * 1000
|
||||
self.sb_api.db_set('Chassis_Private', self.chassis_name, (
|
||||
'nb_cfg_timestamp', nb_cfg_timestamp)).execute(check_error=True)
|
||||
# Also increment nb_cfg by 1 to trigger ChassisAgentWriteEvent which
|
||||
# is responsible to update AgentCache
|
||||
old_nb_cfg = self.sb_api.db_get('Chassis_Private', self.chassis_name,
|
||||
'nb_cfg').execute(check_error=True)
|
||||
self.sb_api.db_set('Chassis_Private', self.chassis_name, (
|
||||
'nb_cfg', old_nb_cfg + 1)).execute(check_error=True)
|
||||
try:
|
||||
n_utils.wait_until_true(check_agent_ts, timeout=5)
|
||||
except n_utils.WaitTimeout:
|
||||
|
||||
Reference in New Issue
Block a user