py38 ReplicationTestCase unit test failure

Bug #1907672 reported by Eric Harney
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Incomplete
Low
Unassigned

Bug Description

Spotted on
https://review.opendev.org/c/openstack/cinder/+/733621/14/

which is one (presumably unrelated) patch on top of HEAD @ d3ffa90baa959.

Test fails because the "availability_zone" field in this call does not match. ("cinder" vs. "nova")

cinder.tests.unit.volume.test_replication_manager.ReplicationTestCase.test_failover_manager_2_cluster_name
----------------------------------------------------------------------------------------------------------

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

      File "/home/zuul/src/opendev.org/openstack/cinder/.tox/py38/lib/python3.8/site-packages/ddt.py", line 182, in wrapper
    return func(self, *args, **kwargs)

      File "/usr/lib/python3.8/unittest/mock.py", line 1325, in patched
    return func(*newargs, **newkeywargs)

      File "/home/zuul/src/opendev.org/openstack/cinder/cinder/tests/unit/volume/test_replication_manager.py", line 286, in test_failover_manager
    finish_mock.assert_called_once_with(self.context, svc, expected_update)

      File "/usr/lib/python3.8/unittest/mock.py", line 925, in assert_called_once_with
    return self.assert_called_with(*args, **kwargs)

      File "/usr/lib/python3.8/unittest/mock.py", line 913, in assert_called_with
    raise AssertionError(_error_message()) from cause

    AssertionError: expected call not found.
Expected: finish_failover(<cinder.context.RequestContext object at 0x7f2f068bd280>, Service(active_backend_id=None,availability_zone='cinder',binary='cinder-volume',cluster=<?>,cluster_name='cluster_name',created_at=2020-12-09T19:54:27Z,deleted=False,deleted_at=None,disabled=False,disabled_reason=None,frozen=False,host='ubuntu-focal-rax-ord-0022137034',id=1,modified_at=None,object_current_version=None,replication_status='enabled',report_count=0,rpc_current_version=None,topic=None,updated_at=2020-12-09T19:54:27Z,uuid='191bbf1e-3446-46b3-8e6c-63b6bd880d43'), {'replication_status': 'failed-over', 'active_backend_id': 'secondary', 'disabled': True, 'disabled_reason': 'failed-over'})
Actual: finish_failover(<cinder.context.RequestContext object at 0x7f2f068bd280>, Service(active_backend_id=None,availability_zone='nova',binary='cinder-volume',cluster=<?>,cluster_name='cluster_name',created_at=2020-12-09T19:54:27Z,deleted=False,deleted_at=None,disabled=False,disabled_reason=None,frozen=False,host='ubuntu-focal-rax-ord-0022137034',id=1,modified_at=None,object_current_version=None,replication_status='enabled',report_count=1,rpc_current_version=None,topic=None,updated_at=2020-12-09T19:54:27Z,uuid='191bbf1e-3446-46b3-8e6c-63b6bd880d43'), {'replication_status': 'failed-over', 'active_backend_id': 'secondary', 'disabled': True, 'disabled_reason': 'failed-over'})

Changed in cinder:
status: New → Triaged
importance: Undecided → Low
tags: added: python38 unit-test
Revision history for this message
Vishal Manchanda (vishalmanchanda) wrote :

This bug needs to verify and confirm again because I can see in a recent patch CI [1], that the test is passing.

[1] https://zuul.opendev.org/t/openstack/build/9d80cf29796746e1a5a8742c5643f2f1/log/job-output.txt#17202

Changed in cinder:
status: Triaged → Incomplete
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.