[FT] Add a timeout for the NB/SB connection stop method
If the DB connection is not stopped at the defined timeout (10 seconds), the clean-up process will continue. Closes-Bug: #2034589 Change-Id: I6c3b4da49364c3fed86053515e79121acac078d6 (cherry picked from commit b40c728cbb0903d78a5d4d47336fe107f06b9f4d)
This commit is contained in:
parent
df02d0dfec
commit
424f1e6f4c
@ -379,8 +379,12 @@ class TestOVNFunctionalBase(test_plugin.Ml2PluginV2TestCase,
|
||||
if self.maintenance_worker:
|
||||
self.mech_driver.nb_synchronizer.stop()
|
||||
self.mech_driver.sb_synchronizer.stop()
|
||||
self.mech_driver.nb_ovn.ovsdb_connection.stop()
|
||||
self.mech_driver.sb_ovn.ovsdb_connection.stop()
|
||||
for ovn_conn in (self.mech_driver.nb_ovn.ovsdb_connection,
|
||||
self.mech_driver.sb_ovn.ovsdb_connection):
|
||||
try:
|
||||
ovn_conn.stop(timeout=10)
|
||||
except Exception: # pylint:disable=bare-except
|
||||
pass
|
||||
|
||||
def restart(self):
|
||||
self.stop()
|
||||
|
Loading…
x
Reference in New Issue
Block a user