← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1841183] Re: Concurrency error when executing "test_update_timpestamp"

 

Reviewed:  https://review.opendev.org/678262
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=0250b86dff47321bea771eec57bad73feb79bbef
Submitter: Zuul
Branch:    master

commit 0250b86dff47321bea771eec57bad73feb79bbef
Author: Rodolfo Alonso Hernandez <ralonsoh@xxxxxxxxxx>
Date:   Fri Aug 23 13:47:22 2019 +0000

    Avoid "utcnow" call clash in "test_update_timpestamp"
    
    The function "uctnow" can be called during the execution of the test
    "test_update_timpestamp". To avoid counting other tests calls to this
    function, a retesting method is implemented for each check done.
    
    Closes-Bug: #1841183
    
    Change-Id: I2b75bb69feb65ca15fa448362baf2cc47fd42126


** 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/1841183

Title:
  Concurrency error when executing "test_update_timpestamp"

Status in neutron:
  Fix Released

Bug description:
  Sometimes [1], the function patched in "test_update_timpestamp",
  "oslo_utils.timeutils.utcnow", is used while executing the test case.

  ft1.7: neutron.tests.unit.extensions.test_timestamp.TimeStampDBMixinTestCase.test_update_timpestamp_StringException: Traceback (most recent call last):
    File "/home/zuul/src/opendev.org/openstack/neutron/neutron/tests/base.py", line 177, in func
      return f(self, *args, **kwargs)
    File "/home/zuul/src/opendev.org/openstack/neutron/neutron/tests/unit/extensions/test_timestamp.py", line 269, in test_update_timpestamp
      self.assertEqual(1, timenow.call_count)
    File "/home/zuul/src/opendev.org/openstack/neutron/.tox/py36/lib/python3.6/site-packages/testtools/testcase.py", line 411, in assertEqual
      self.assertThat(observed, matcher, message)
    File "/home/zuul/src/opendev.org/openstack/neutron/.tox/py36/lib/python3.6/site-packages/testtools/testcase.py", line 498, in assertThat
      raise mismatch_error
  testtools.matchers._impl.MismatchError: 1 != 2

  
  [1] https://a6b55b727208d469fce9-a76e08006e67cd388b33580b35bd0960.ssl.cf2.rackcdn.com/677484/2/check/openstack-tox-py36/ff3d557/testr_results.html.gz

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


References