Lots of text output in the unit test results

Bug #1378907 reported by Julie Pichon
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Medium
Akihiro Motoki

Bug Description

----- UPDATED DESCRIPTION ----
After Ana's fix the only remaining noise that I see is this message:
DEBUG:cinderclient.client:Connection error: ('Connection aborted.', gaierror(-2, 'Name or service not known'))

It just pops up in the middle of the tests. Apparently it can't be reproduced in all environments.
----- ORIGINAL DESCRIPTION BELOW -----
Running the unit tests on master with a fresh venv results in a ton of noise. The tests don't fail but we should have a clean output.

Highlights include:

ConnectionFailed: Connection to neutron failed: ('Connection aborted.', gaierror(-2, 'Name or service not known'))

  File "/home/jpichon/devel/horizon/horizon/exceptions.py", line 326, in handle
    raise Http302(redirect)
Http302

ConnectionError: ('Connection aborted.', gaierror(-2, 'Name or service not known'))

Error while checking action permissions.
Traceback (most recent call last):
  File "/home/jpichon/devel/horizon/horizon/tables/base.py", line 1236, in _filter_action
    return action._allowed(request, datum) and row_matched
  File "/home/jpichon/devel/horizon/horizon/tables/actions.py", line 137, in _allowed
    return self.allowed(request, datum)
  File "/home/jpichon/devel/horizon/openstack_dashboard/dashboards/project/volumes/snapshots/tables.py", line 46, in allowed
    if (snapshot._volume and
  File "/home/jpichon/devel/horizon/openstack_dashboard/api/base.py", line 81, in __getattribute__
    return object.__getattribute__(self, attr)
AttributeError: 'VolumeSnapshot' object has no attribute '_volume'

DEBUG:cinderclient.client:Connection error: ('Connection aborted.', gaierror(-2, 'Name or service not known'))

But there really is a lot...

This doesn't seem to be happening on the juno-rc1 tag.

Tags: heisenbug
Doug Fish (drfish)
Changed in horizon:
status: New → Confirmed
Changed in horizon:
assignee: nobody → Gary W. Smith (gary-w-smith)
Changed in horizon:
assignee: Gary W. Smith (gary-w-smith) → nobody
Revision history for this message
Gary W. Smith (gary-w-smith) wrote :

As the description indicates, there are now lots of errors in the unit test output. git bisect identified that these were introduced in commits 0ee604c1 and aa930569, which are part of the implementation of blueprint detail-pages-ia. It appears that these changes cause different / additional apis to be invoked when rendering pages, which are not incorporated into the unit tests.

Revision history for this message
Gary W. Smith (gary-w-smith) wrote :

Assigning to the author of all of those changes, since the fixes are closely related to that code.

Changed in horizon:
assignee: nobody → Ana Krivokapić (akrivoka)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/127237

Changed in horizon:
status: Confirmed → In Progress
Doug Fish (drfish)
tags: added: heisenbug
description: updated
Revision history for this message
Doug Fish (drfish) wrote :

I've been studying this for a while and now I feel more confused. :-(

It seems that we have 4 test cases that fail when run individually, but when they are run as part of other testing they succeed. Here's what I did:

./run_tests.sh
includes the statement:
DEBUG:cinderclient.client:Connection error: ('Connection aborted.', gaierror(-2, 'Name or service not known'))
in the output but at the end the tests claim success.

grep -r "test.TestCase" openstack_dashboard | awk -F"(" '{print $1 }' | sed s/.py:class// | sed 's/\//./g' | sed 's/ /:/' | xargs ./run_tests.sh
runs all of the openstack_dashboard tests enumerated in one test run. They all succeed without the DEBUG message.

grep -r "test.TestCase" openstack_dashboard | awk -F"(" '{print $1 }' | sed s/.py:class// | sed 's/\//./g' | sed 's/ /:/' | xargs -I {} ./run_tests.sh {}
runs all of the tests in an individual test run. I see 3 tests fail when run individually
 openstack_dashboard.test.api_tests.cinder_tests:CinderApiVersionTests
 openstack_dashboard.test.tests.templates:TemplateRenderTest
 openstack_dashboard.test.api_tests.base_tests:ApiHelperTests

I've gone back to make sure my command line stra

I see that
horizon.test.tests.base:RbacHorizonTests
also fails when run individually

I'm not sure yet if this is another symptom of the same problem, or if this is a separate issue.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/127642

Changed in horizon:
assignee: Ana Krivokapić (akrivoka) → Akihiro Motoki (amotoki)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/127237
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=6f0f18334b3ced3eaf5315ba4b0ec037b2cc1bf2
Submitter: Jenkins
Branch: master

commit 6f0f18334b3ced3eaf5315ba4b0ec037b2cc1bf2
Author: Ana Krivokapic <email address hidden>
Date: Thu Oct 9 15:20:09 2014 +0200

    Clean up test output

    Some of the API calls weren't mocked properly. Add the missing mocks so
    the test output is again clean.

    Change-Id: I83fff8ee3f63e79ef5786602d6516703a22f0702
    Partial-bug: #1378907

David Lyle (david-lyle)
Changed in horizon:
milestone: none → next
milestone: next → kilo-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/127642
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=1828eecc855fc86980b27796c28f7ddbbcdccfef
Submitter: Jenkins
Branch: master

commit 1828eecc855fc86980b27796c28f7ddbbcdccfef
Author: Akihiro Motoki <email address hidden>
Date: Sat Oct 11 04:59:39 2014 +0900

    Stubout cinder.tenant_absolute_limits in cinder test

    To render dropdown actions to detail page, allowed() method
    in the volume table is called, so a method called in allowed()
    needs to be stubout.

    Change-Id: Ib65eee0fa2c8b6535e1e391579fcd1bdb0f83bc1
    Closes-Bug: #1378907

Changed in horizon:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: kilo-1 → 2015.1.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.