test_generator() test failure - Wrong number of items found

Bug #1757040 reported by pengdake
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Mistral
Confirmed
Medium
Unassigned

Bug Description

I get success result when I run "tox -epy27 -- mistral.tests.unit.actions.openstack.test_generator.GeneratorTest.test_generator"

But I get failed result when I run the test by testtools (https://wiki.openstack.org/wiki/Testr#Debugging_.28pdb.29_Tests)

release-bug: https://bugs.launchpad.net/mistral/+bug/1757036

Revision history for this message
Dougal Matthews (d0ugal) wrote :

Can you provide the command you used to run the test with testtools and also show us the error received?

Changed in mistral:
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Corey Bryant (corey.bryant) wrote :

Pasting the error that I see here:

======================================================================
FAIL: mistral.tests.unit.actions.openstack.test_generator.GeneratorTest.test_generator
mistral.tests.unit.actions.openstack.test_generator.GeneratorTest.test_generator
----------------------------------------------------------------------
_StringException: Traceback (most recent call last):
  File "mistral/tests/unit/actions/openstack/test_generator.py", line 102, in test_generator
    name=action_name
  File "mistral/tests/unit/base.py", line 141, in _assert_single_item
    return self._assert_multiple_items(items, 1, **props)[0]
  File "mistral/tests/unit/base.py", line 164, in _assert_multiple_items
    "expected=%s, found=%s]" % (props, count, found))
  File "/usr/lib/python2.7/dist-packages/unittest2/case.py", line 690, in fail
    raise self.failureException(msg)
AssertionError: Wrong number of items found [props={'name': 'senlin.get_profile'}, expected=1, found=0]

Revision history for this message
Corey Bryant (corey.bryant) wrote :

We're just running tests with 'stestr run'. Typically issues like this occur due to dependency differences where the tox virtualenv has a dependency that differs from the failing environment. I'm hitting this in Ubuntu package builds so I imagine we have a dependency that falls within the allowed requirements constraints, but actually doesn't work.

Revision history for this message
Corey Bryant (corey.bryant) wrote :

Some more debug:

DEBUG: action_classes=[]
DEBUG: action_name=senlin.get_profile

summary: - Problem of tox
+ test_generator() test failure
summary: - test_generator() test failure
+ test_generator() test failure - Wrong number of items found
Dougal Matthews (d0ugal)
Changed in mistral:
status: Incomplete → Confirmed
importance: Low → Medium
milestone: none → rocky-3
Dougal Matthews (d0ugal)
Changed in mistral:
milestone: rocky-3 → stein-1
Dougal Matthews (d0ugal)
Changed in mistral:
milestone: stein-1 → none
Revision history for this message
Corey Bryant (corey.bryant) wrote :

I'm seeing this on train now with:

======================================================================
FAIL: mistral.tests.unit.actions.openstack.test_generator.GeneratorTest.test_generator
mistral.tests.unit.actions.openstack.test_generator.GeneratorTest.test_generator
----------------------------------------------------------------------
_StringException: Traceback (most recent call last):
  File "/<<PKGBUILDDIR>>/mistral/tests/unit/actions/openstack/test_generator.py", line 117, in test_generator
    name=action_name
  File "/<<PKGBUILDDIR>>/mistral/tests/unit/base.py", line 140, in _assert_single_item
    return self._assert_multiple_items(items, 1, **props)[0]
  File "/<<PKGBUILDDIR>>/mistral/tests/unit/base.py", line 163, in _assert_multiple_items
    "expected=%s, found=%s]" % (props, count, found))
  File "/usr/lib/python3/dist-packages/unittest2/case.py", line 690, in fail
    raise self.failureException(msg)
AssertionError: Wrong number of items found [props={'name': 'ironic.node_list'}, expected=1, found=0]

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.