Skip to content

Commit ef900d6

Browse files
ralonsohkarelyatin
authored andcommitted
[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 b40c728)
1 parent 2fdb302 commit ef900d6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

neutron/tests/functional/base.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,8 +407,12 @@ def stop(self):
407407
if self.maintenance_worker:
408408
self.mech_driver.nb_synchronizer.stop()
409409
self.mech_driver.sb_synchronizer.stop()
410-
self.mech_driver.nb_ovn.ovsdb_connection.stop()
411-
self.mech_driver.sb_ovn.ovsdb_connection.stop()
410+
for ovn_conn in (self.mech_driver.nb_ovn.ovsdb_connection,
411+
self.mech_driver.sb_ovn.ovsdb_connection):
412+
try:
413+
ovn_conn.stop(timeout=10)
414+
except Exception: # pylint:disable=bare-except
415+
pass
412416

413417
def restart(self):
414418
self.stop()

0 commit comments

Comments
 (0)