Functional: assert multiple calls for update_virtual_port_host

test_virtual_port_host_update assumed update_virtual_port_host
to be called once, but the test started to fail when [1] was
merged and OVN version was bumped to v22.03.3 (not yet released).
PortBindingUpdateVirtualPortsEvent with event ROW_DELETE
received twice in the failing case.

Backport Note: It's required since [2] merged, ovn version deployed is
not related to the failure.

[1]: https://review.opendev.org/c/openstack/neutron/+/880890
[2]: https://review.opendev.org/q/I34caf7d0212ccb4bd7259c4414e7c3994bd8da4d



Closes-bug: #2023634
Change-Id: I0ac92e3692fb1ba9667fee2f6fbf531a57b7b5b8
(cherry picked from commit 593278550a)
This commit is contained in:
elajkat 2023-06-14 15:15:06 +02:00 committed by yatin
parent efa5bc59f4
commit 4a7e7f2d25

View File

@ -399,7 +399,11 @@ class TestNBDbMonitor(base.TestOVNFunctionalBase):
n_utils.wait_until_true(lambda: mock_update_vip_host.called,
timeout=10)
# The virtual port is deleted and so the associated "Port_Binding".
mock_update_vip_host.assert_called_once_with(vip['id'], None)
# With OVN v22.03.3 sometimes 2 delete events are received with the
# same arguments.
# TODO(lajoskatona): check when new OVN version is out
# if this behaviour is changed.
mock_update_vip_host.assert_called_with(vip['id'], None)
class TestNBDbMonitorOverTcp(TestNBDbMonitor):