[Django] #20432: GroupAdminTest.test_group_permission_performance fail on full test suite run

1 view
Skip to first unread message

Django

unread,
May 18, 2013, 5:44:51 AM5/18/13
to django-...@googlegroups.com
#20432: GroupAdminTest.test_group_permission_performance fail on full test suite
run
-------------------------------+--------------------
Reporter: otherjacob | Owner:
Type: Bug | Status: new
Component: contrib.admin | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
the test passes when running all the admin_views tests in isolation, but
fails when running with test suite.

Final pass of running the test against --bisect produces this:

======================================================================
FAIL: test_group_permission_performance (admin_views.tests.GroupAdminTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/jacob/git/django/tests/admin_views/tests.py", line 3660, in
test_group_permission_performance
self.assertEqual(response.status_code, 200)
File "/Users/jacob/git/django/django/test/testcases.py", line 181, in
__exit__
executed, self.num
AssertionError: 7 queries executed, 8 expected

----------------------------------------------------------------------
Ran 190 tests in 6.069s

FAILED (failures=1, skipped=2)
Destroying test database for alias 'default'...
Destroying test database for alias 'other'...
***** Problem found in second half. Bisecting again...
***** Source of error: django.contrib.auth

--
Ticket URL: <https://code.djangoproject.com/ticket/20432>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
May 18, 2013, 5:59:06 AM5/18/13
to django-...@googlegroups.com
#20432: GroupAdminTest.test_group_permission_performance fail on full test suite
run
-------------------------------+--------------------------------------

Reporter: otherjacob | Owner:
Type: Bug | Status: new
Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by ambv):

* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


Comment:

The missing query is

{{{
{'sql': 'QUERY = \'SELECT "django_content_type"."id",
"django_content_type"."name", "django_content_type"."app_label",
"django_content_type"."model" FROM "django_content_type" WHERE
("django_content_type"."model" = %s AND "django_content_type"."app_label"
= %s )\' - PARAMS = (\'group\', \'auth\')', 'time': '0.000'},
}}}

ContentTypeManager caches get_for_model() queries. Another test caches the
Group content type.

--
Ticket URL: <https://code.djangoproject.com/ticket/20432#comment:1>

Django

unread,
May 18, 2013, 7:14:41 AM5/18/13
to django-...@googlegroups.com
#20432: GroupAdminTest.test_group_permission_performance fail on full test suite
run
-------------------------------------+-------------------------------------
Reporter: otherjacob | Owner: Aymeric
Type: Bug | Augustin <aymeric.augustin@…>
Component: contrib.admin | Status: closed
Severity: Normal | Version: master
Keywords: | Resolution: fixed
Has patch: 0 | Triage Stage:
Needs tests: 0 | Unreviewed
Easy pickings: 0 | Needs documentation: 0
| Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Aymeric Augustin <aymeric.augustin@…>):

* status: new => closed
* owner: => Aymeric Augustin <aymeric.augustin@…>
* resolution: => fixed


Comment:

In [changeset:"340115200f459d02e9a3e61c9704653215e185d5"]:
{{{
#!CommitTicketReference repository=""
revision="340115200f459d02e9a3e61c9704653215e185d5"
Fixed #20432 -- Test failure in admin_views.

The failure was triggered by a cache leak.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/20432#comment:2>

Django

unread,
Nov 27, 2014, 1:11:41 PM11/27/14
to django-...@googlegroups.com
#20432: GroupAdminTest.test_group_permission_performance fail on full test suite
run
-------------------------------------+-------------------------------------
Reporter: otherjacob | Owner: Aymeric
Type: Bug | Augustin <aymeric.augustin@…>
Component: contrib.admin | Status: closed
Severity: Normal | Version: master
Keywords: | Resolution: fixed
Has patch: 0 | Triage Stage:
Needs tests: 0 | Unreviewed
Easy pickings: 0 | Needs documentation: 0
| Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"7cd3f1c29595d1da7f37d29e7c3bc6a7a314cd1d"]:
{{{
#!CommitTicketReference repository=""
revision="7cd3f1c29595d1da7f37d29e7c3bc6a7a314cd1d"
Fixed cache state dependence for assertNumQueries in
test_group_permission_performance.

Refs #20432 and #23746.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/20432#comment:3>

Reply all
Reply to author
Forward
0 new messages