Fix functional tests timeout race condition
The test_idl_run_exception_terminates test sometimes fails in the gate with the following error; ovsdbapp.exceptions.TimeoutException: Commands [<ovsdbapp.schema.open_vswitch.commands.BridgeExistsCommand object at 0x7fcec0639150>] exceeded timeout 1 seconds This seems to be due to another test called test_post_commit_vswitchd_incomplete_timeout setting the transaction timeout to 1 second. If the tests runs concurrently there's a chance that such change would also affect the other tests. This patch is changing the way that we force a timeout for the test_post_commit_vswitchd_incomplete_timeout test by mocking the timeout_exceed() method to return True within the scope of that patch only. Change-Id: I3f391f0b80285a2418987e2c51985732fa2cc352 Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
This commit is contained in:
parent
03a79cb37b
commit
d85e5b8029
|
@ -197,5 +197,6 @@ class ImplIdlTestCase(base.FunctionalTestCase):
|
|||
def test_post_commit_vswitchd_incomplete_timeout(self, *args):
|
||||
# Due to timing issues we may rarely hit the global timeout, which
|
||||
# raises RuntimeError to match the vsctl implementation
|
||||
self.api.ovsdb_connection.timeout = 1
|
||||
mock.patch('ovsdbapp.backend.ovs_idl.transaction.'
|
||||
'Transaction.timeout_exceeded', return_value=True).start()
|
||||
self.assertRaises((exc.TimeoutException, RuntimeError), self._add_br)
|
||||
|
|
Loading…
Reference in New Issue