Skip to content

Commit 603f388

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 f6c3b2b commit 603f388

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
@@ -408,8 +408,12 @@ def stop(self):
408408
if self.maintenance_worker:
409409
self.mech_driver.nb_synchronizer.stop()
410410
self.mech_driver.sb_synchronizer.stop()
411-
self.mech_driver.nb_ovn.ovsdb_connection.stop()
412-
self.mech_driver.sb_ovn.ovsdb_connection.stop()
411+
for ovn_conn in (self.mech_driver.nb_ovn.ovsdb_connection,
412+
self.mech_driver.sb_ovn.ovsdb_connection):
413+
try:
414+
ovn_conn.stop(timeout=10)
415+
except Exception: # pylint:disable=bare-except
416+
pass
413417

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

0 commit comments

Comments
 (0)