← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1809983] Re: unittest: NoReverseMatch for test panels sometimes happens

 

Reviewed:  https://review.openstack.org/627640
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=a69ba853a78090d0e23be2dd5f8f2e5d4e564df4
Submitter: Zuul
Branch:    master

commit a69ba853a78090d0e23be2dd5f8f2e5d4e564df4
Author: Akihiro Motoki <amotoki@xxxxxxxxx>
Date:   Sun Jan 6 15:05:43 2019 +0900

    UT: Run test_plugins as separate process
    
    This commit changes to run test_plugins in a separate process.
    
    test_plugins touches urlpatterns and Site registry during setUp(),
    but the cleanup process in tearDown does not recover urlpatterns correctly.
    After tests under test_plugins run, the urlpatterns continues to have
    entries of test panels and this leads to NoReverseMatch error when
    rendering other panels after that.
    
    I investigated details in setUp/tearDown of PluginTestCase but failed
    to find a good solution to recover urlpatterns and Horizon Site registry.
    As a workaround, runnig test_plugins in a separate process can avoid
    the issue.
    
    Closes-Bug: #1809983
    Change-Id: I848f6b341b3f93ed055955b2b12d2497811edc5a


** Changed in: horizon
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1809983

Title:
  unittest: NoReverseMatch for test panels sometimes happens

Status in OpenStack Dashboard (Horizon):
  Fix Released

Bug description:
  NoReverseMatch error occasionally happens in openstack_dashboard unit tests.
  For example, NoReverseMatch: u'plugin_panel' is not a registered namespace inside 'horizon:admin'
  This seems to depends on the order of tests executed.

  Recent examples are:
  http://logs.openstack.org/18/498018/34/check/openstack-tox-py27/e1fc800/job-output.txt.gz#_2018-12-28_11_51_09_741094
  http://logs.openstack.org/26/627626/1/check/openstack-tox-py27/0f30a56/job-output.txt.gz#_2018-12-28_11_41_14_703315

  Captured example is http://paste.openstack.org/show/739018/

  In addition, horizon current unit test does not catch errors in template rendering.
  This can be enabled by specifying debug=True in OPTIONS parameter in TEMPLATES.
  https://docs.djangoproject.com/en/2.1/topics/templates/#module-django.template.backends.django

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


References