Submitter: Jenkins
Branch:    master

commit 2676372f261da202f41ab8e2d175be27b9405261
Author: Ihar Hrachyshka <>
Date:   Sat Sep 10 06:07:58 2016 +0000

    tests: don't override base object test class attributes
    DNSNameServerDbObjectTestCase was overriding self.db_objs and
    self.obj_fields if the attributes did not have unique order/address
    fields generated by get_random_fields. But since
    Id1ca4ce7b134d9729e68661cedb2f5556e58d6ff landed, we should have also
    updated self.objs, otherwise test_filtering_by_fields will fail later
    when it will try to find an object with attributes that were not used
    when creating the object targeted by the filtering attempt.
    Instead of adding the update for self.objs in the
    DNSNameServerDbObjectTestCase test class, I went with an alternative
    approach, getting rid of overriding logic completely. The rationale for
    the path is that there is nothing wrong in duplicate address and order
    field values (at least as per underlying model definition), and hence
    our tests should be resilient against that kind of scenario.
    So instead of comparing all fields for an object, just make sure that
    the order monotonically goes up/down in the sorted result, and ignore
    other fields to be strictly ordered.
    Change-Id: Ic956072de5dab336f83b04bddfa9da967b2865b2
    Closes-Bug: #1623425

** 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.

  DNSNameServerDbObjectTestCase.test_filtering_by_fields fails sometimes

Status in neutron:
  Fix Released

Bug description:
  The test fails sometimes.


  Captured traceback:
      b'Traceback (most recent call last):'
      b'  File 
"/home/vagrant/git/neutron/neutron/tests/unit/objects/", line 1215, 
in test_filtering_by_fields'
      b"    'Filtering by %s failed.' % field)"
      b'  File 
 line 1182, in assertItemsEqual'
      b'    return self.assertSequenceEqual(expected, actual, msg=msg)'
      b'  File 
 line 1014, in assertSequenceEqual'
      b'  File 
 line 690, in fail'
      b'    raise self.failureException(msg)'
      b"AssertionError: Sequences differ: [{'subnet_id': 
'a8b63bc4-9799-4781-83c8-48e9491dcd5e', 'address': 'ioojfcuswf'}] != []"
      b'First sequence contains 1 additional elements.'
      b'First extra element 0:'
      b"{'subnet_id': 'a8b63bc4-9799-4781-83c8-48e9491dcd5e', 'address': 
      b'+ []'
      b"- [{'address': 'ioojfcuswf',"
      b"-   'subnet_id': 'a8b63bc4-9799-4781-83c8-48e9491dcd5e'}] : Filtering 
by order failed."

  Reproducible with: ostestr  --regex

  Log example:

To manage notifications about this bug go to:

Mailing list:
Post to     :
Unsubscribe :
More help   :

Reply via email to