← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1593647] Re: TestDesignateClient.test_secure_client fails with AssertionError: Expected call: mock(verify='...')

 

Reviewed:  https://review.openstack.org/331541
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=3703b31eea06d5055a7fc63cec7a24b2aaa1c563
Submitter: Jenkins
Branch:    master

commit 3703b31eea06d5055a7fc63cec7a24b2aaa1c563
Author: Ihar Hrachyshka <ihrachys@xxxxxxxxxx>
Date:   Mon Jun 20 09:38:13 2016 +0200

    tests: clean up designate client session mock on test exit
    
    This test was modifying the driver session method without making an
    effort to restore the original value after the test case completion.
    This resulted in two consequent tests that relied on the method that
    were triggered in the same test thread, to trigger a failure for one of
    them.
    
    Changed the setup logic for the test class to use mock.patch(..).start()
    instead.
    
    Closes-Bug: #1593647
    Change-Id: I08be90691b5417025c40c5a18308d820dc7a43d2


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

Title:
  TestDesignateClient.test_secure_client fails with  AssertionError:
  Expected call: mock(verify='...')

Status in neutron:
  Fix Released

Bug description:
  The test sometimes fails in gate:

  http://logs.openstack.org/30/271830/8/check/gate-neutron-
  python27/4b77bb6/testr_results.html.gz

  ft507.2: neutron.tests.unit.plugins.ml2.extensions.test_dns_integration.TestDesignateClient.test_secure_client_StringException: Traceback (most recent call last):
    File "neutron/tests/unit/plugins/ml2/extensions/test_dns_integration.py", line 558, in test_secure_client
      driver.session.Session.assert_called_with(verify=self.TEST_CA_CERT)
    File "/home/jenkins/workspace/gate-neutron-python27/.tox/py27/local/lib/python2.7/site-packages/mock/mock.py", line 925, in assert_called_with
      raise AssertionError('Expected call: %s\nNot called' % (expected,))
  AssertionError: Expected call: mock(verify='d7302899d10b4e8381f2345b966fd299')
  Not called

  Logstash:
  http://logstash.openstack.org/#dashboard/file/logstash.json?query=message%3A%5C%22in%20test_secure_client%5C%22

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


References