test_bfd_add_may_exist_no_change can fail due to OVN changing the 'status' field

Bug #2058264 reported by Terry Wilson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ovsdbapp
Fix Released
Undecided
Unassigned

Bug Description

==============================
Failed 1 tests - output below:
==============================

ovsdbapp.tests.functional.schema.ovn_northbound.test_impl_idl.TestBFDOps.test_bfd_add_may_exist_no_change
---------------------------------------------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):

      File "/home/zuul/src/opendev.org/openstack/ovsdbapp/ovsdbapp/tests/functional/schema/ovn_northbound/test_impl_idl.py", line 2587, in test_bfd_add_may_exist_no_change
    self.assertEqual(b1, b2)

      File "/home/zuul/src/opendev.org/openstack/ovsdbapp/.tox/functional/lib/python3.10/site-packages/testtools/testcase.py", line 395, in assertEqual
    self.assertThat(observed, matcher, message)

      File "/home/zuul/src/opendev.org/openstack/ovsdbapp/.tox/functional/lib/python3.10/site-packages/testtools/testcase.py", line 482, in assertThat
    raise mismatch_error

    testtools.matchers._impl.MismatchError: !=:
reference = BFD(uuid=UUID('61baedc6-2764-49b7-ae91-5fa7ef22a322'), logical_port='test96233d13', status=[], external_ids={}, options={}, min_tx=[], dst_ip='test96233d13', detect_mult=[], min_rx=[])

This happens because the 'status' field can be set by OVN, so we can't rely on it not changing during the test.

Tags: bfd functional
Revision history for this message
Lajos Katona (lajos-katona) wrote :
Changed in ovsdbapp:
status: New → Confirmed
tags: added: bfd functional
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ovsdbapp (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/ovsdbapp/+/913688

Changed in ovsdbapp:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ovsdbapp (master)

Reviewed: https://review.opendev.org/c/openstack/ovsdbapp/+/913688
Committed: https://opendev.org/openstack/ovsdbapp/commit/d5e21c17b28cb063d3ab4005bfde973c1321107b
Submitter: "Zuul (22348)"
Branch: master

commit d5e21c17b28cb063d3ab4005bfde973c1321107b
Author: Frode Nordahl <email address hidden>
Date: Tue Mar 19 16:12:03 2024 +0100

    Fix BFD functional test, avoid comparing status column

    The status column is updated by OVN so we cannot rely on its
    contents being stable.

    The test already attempts to address this by using frozen rows,
    but that does not fully solve the issue as objects are created at
    different points in time and then compared, which may give
    unpredictable results.

    Filter out the `status` column from the affected tests.

    Closes-Bug: #2058264
    Change-Id: Ibaa54d93109434b445f54de583f534021defccbb
    Signed-off-by: Frode Nordahl <email address hidden>

Changed in ovsdbapp:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.