← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 2043959] Re: Unit test jobs with neutron-lib master(3.9.0) failing

 

Reviewed:  https://review.opendev.org/c/openstack/neutron/+/901430
Committed: https://opendev.org/openstack/neutron/commit/95b4e8f41dbc56911369733a264a20c4affc1173
Submitter: "Zuul (22348)"
Branch:    master

commit 95b4e8f41dbc56911369733a264a20c4affc1173
Author: yatinkarel <ykarel@xxxxxxxxxx>
Date:   Mon Nov 20 12:29:33 2023 +0530

    Make unit tests compatible with neutron-lib-3.9.0
    
    A new flag was added with [1], adapt unit tests with it.
    Also drop an older compatibility check which is no longer
    needed as neutron-lib>=3.8.0 already.
    
    [1] https://review.opendev.org/c/openstack/neutron-lib/+/895940
    Needed-By: https://review.opendev.org/c/openstack/requirements/+/901231
    Closes-Bug: #2043959
    
    Change-Id: I3b48b418d2d1293cdcf8fefb1b9ff7005bbebb29


** Changed in: neutron
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/2043959

Title:
  Unit test jobs with neutron-lib master(3.9.0) failing

Status in neutron:
  Fix Released

Bug description:
  Since https://review.opendev.org/c/openstack/neutron-lib/+/895940 the job fails as:-
  ft1.2: neutron.tests.unit.plugins.ml2.drivers.agent.test_capabilities.CapabilitiesTest.test_registertesttools.testresult.real._StringException: Traceback (most recent call last):
    File "/home/zuul/src/opendev.org/openstack/neutron/neutron/tests/base.py", line 178, in func
      return f(self, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/zuul/src/opendev.org/openstack/neutron/neutron/tests/unit/plugins/ml2/drivers/agent/test_capabilities.py", line 47, in test_register
      self._mgr.subscribe.assert_called_with(*args)
    File "/usr/lib/python3.11/unittest/mock.py", line 933, in assert_called_with
      raise AssertionError(_error_message()) from cause
  AssertionError: expected call not found.
  Expected: subscribe(<Mock id='140017646759568'>, <Mock id='140017646753232'>, 'after_init', 55550000)
  Actual: subscribe(<Mock id='140017646759568'>, <Mock id='140017646753232'>, 'after_init', 55550000, False)

  
  ft3.1: neutron.tests.unit.services.logapi.drivers.test_manager.TestHandleResourceCallback.test_subscribe_resources_cbtesttools.testresult.real._StringException: Traceback (most recent call last):
    File "/home/zuul/src/opendev.org/openstack/neutron/neutron/tests/base.py", line 178, in func
      return f(self, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/zuul/src/opendev.org/openstack/neutron/neutron/tests/unit/services/logapi/drivers/test_manager.py", line 189, in test_subscribe_resources_cb
      self._cb_mgr.subscribe.assert_has_calls(assert_calls)
    File "/usr/lib/python3.11/unittest/mock.py", line 970, in assert_has_calls
      raise AssertionError(
  AssertionError: Calls not found.

  ft4.1: neutron.tests.unit.services.trunk.rpc.test_backend.ServerSideRpcBackendTest.test___init__testtools.testresult.real._StringException: Traceback (most recent call last):
    File "/home/zuul/src/opendev.org/openstack/neutron/neutron/tests/base.py", line 178, in func
      return f(self, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/zuul/src/opendev.org/openstack/neutron/neutron/tests/unit/services/trunk/rpc/test_backend.py", line 60, in test___init__
      self._mgr.subscribe.assert_has_calls(calls, any_order=True)
    File "/usr/lib/python3.11/unittest/mock.py", line 986, in assert_has_calls
      raise AssertionError(
  AssertionError: 'subscribe' does not contain all of (call(<bound method ServerSideRpcBackend.process_event of <neutron.services.trunk.rpc.backend.ServerSideRpcBackend object at 0x7faa950feed0>>, 'trunk', 'after_create', 55550000), call(<bound method ServerSideRpcBackend.process_event of <neutron.services.trunk.rpc.backend.ServerSideRpcBackend object at 0x7faa950feed0>>, 'trunk', 'after_delete', 55550000), call(<bound method ServerSideRpcBackend.process_event of <neutron.services.trunk.rpc.backend.ServerSideRpcBackend object at 0x7faa950feed0>>, 'subports', 'after_create', 55550000), call(<bound method ServerSideRpcBackend.process_event of <neutron.services.trunk.rpc.backend.ServerSideRpcBackend object at 0x7faa950feed0>>, 'subports', 'after_delete', 55550000)) in its call list, found [call(<bound method ServerSideRpcBackend.process_event of <neutron.services.trunk.rpc.backend.ServerSideRpcBackend object at 0x7faa950feed0>>, 'trunk', 'after_create', 55550000, False), call(<bound method ServerSideRpcBackend.process_event of <neutron.services.trunk.rpc.backend.ServerSideRpcBackend object at 0x7faa950feed0>>, 'subports', 'after_create', 55550000, False), call(<bound method ServerSideRpcBackend.process_event of <neutron.services.trunk.rpc.backend.ServerSideRpcBackend object at 0x7faa950feed0>>, 'trunk', 'after_delete', 55550000, False), call(<bound method ServerSideRpcBackend.process_event of <neutron.services.trunk.rpc.backend.ServerSideRpcBackend object at 0x7faa950feed0>>, 'subports', 'after_delete', 55550000, False)] instead

  Need to make these unit tests compatible with neutron-lib 3.9.0.

  Example failure:-
  https://25f3b33717093a9f4f4e-a759d6b54561529b072782a6b0052389.ssl.cf5.rackcdn.com/periodic/opendev.org/openstack/neutron/master/openstack-tox-py311-with-neutron-lib-master/87a570a/testr_results.html

  Builds:-
  https://zuul.openstack.org/builds?job_name=openstack-tox-py311-with-neutron-lib-master&job_name=openstack-tox-py311-with-sqlalchemy-master&project=openstack%2Fneutron&skip=0

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/2043959/+subscriptions



References