[Django] #23707: GIS tests may be run multiple times

42 views
Skip to first unread message

Django

unread,
Oct 23, 2014, 2:14:32 PM10/23/14
to django-...@googlegroups.com
#23707: GIS tests may be run multiple times
------------------------------------------------+------------------------
Reporter: claudep | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Testing framework | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+------------------------
When a test label is duplicated or overlapping, or in the case an app is
inside another app (like it is for `django.contrib.gis` and
`django.contrib.gis.tests.geo3d` for example), some tests are run multiple
times.

You can see that by searching for a GIS test function name in the CI
output of a GIS-enabled suite. I'd suggest preventing those unneeded
duplicate tests.

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

Django

unread,
Oct 23, 2014, 2:16:48 PM10/23/14
to django-...@googlegroups.com
#23707: GIS tests may be run multiple times
--------------------------------------+------------------------------------

Reporter: claudep | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by timgraham):

* stage: Unreviewed => Accepted


Comment:

That explains why Jenkins reports 2 failures for each GIS test sometimes.

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

Django

unread,
Oct 23, 2014, 2:17:19 PM10/23/14
to django-...@googlegroups.com
#23707: GIS tests may be run multiple times
-------------------------------------+-------------------------------------
Reporter: claudep | Owner: nobody
Type: | Status: new
Cleanup/optimization | Version: master
Component: Testing framework | Resolution:
Severity: Normal | Triage Stage:
Keywords: | Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by carljm):

* stage: Accepted => Unreviewed


Comment:

Since the discovery test runner recurses into subdirectories anyway, the
most straightforward fix here should be to remove the "inner" nested
directory from the list of test labels uses by `runtests.py`. I'd need to
dig into `runtests.py` a bit to see how that could be done.

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

Django

unread,
Oct 23, 2014, 2:17:38 PM10/23/14
to django-...@googlegroups.com
#23707: GIS tests may be run multiple times
--------------------------------------+------------------------------------

Reporter: claudep | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by carljm):

* stage: Unreviewed => Accepted


Comment:

Oops.

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

Django

unread,
Oct 23, 2014, 2:18:31 PM10/23/14
to django-...@googlegroups.com
#23707: GIS tests may be run multiple times
--------------------------------------+------------------------------------

Reporter: claudep | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by claudep):

* has_patch: 0 => 1


Comment:

https://github.com/django/django/pull/3415

--
Ticket URL: <https://code.djangoproject.com/ticket/23707#comment:4>

Django

unread,
Oct 23, 2014, 2:19:39 PM10/23/14
to django-...@googlegroups.com
#23707: GIS tests may be run multiple times
--------------------------------------+------------------------------------

Reporter: claudep | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by claudep):

@carljm: Already tried your solution, but we currently need those "inner"
paths for application discovery (to set INSTALLED_APPS).

--
Ticket URL: <https://code.djangoproject.com/ticket/23707#comment:5>

Django

unread,
Oct 23, 2014, 2:20:02 PM10/23/14
to django-...@googlegroups.com
#23707: GIS tests may be run multiple times
--------------------------------------+------------------------------------

Reporter: claudep | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by carljm):

Cool. Your fix works too. I don't think there would be any case where a
user would provide overlapping paths and _want_ some tests run twice.

--
Ticket URL: <https://code.djangoproject.com/ticket/23707#comment:6>

Django

unread,
Oct 23, 2014, 2:32:54 PM10/23/14
to django-...@googlegroups.com
#23707: GIS tests may be run multiple times
-------------------------------------+-------------------------------------
Reporter: claudep | Owner: nobody

Type: | Status: new
Cleanup/optimization | Version: master
Component: Testing framework | Resolution:
Severity: Normal | Triage Stage: Ready for
Keywords: | checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/23707#comment:7>

Django

unread,
Oct 23, 2014, 3:04:33 PM10/23/14
to django-...@googlegroups.com
#23707: GIS tests may be run multiple times
-------------------------------------+-------------------------------------
Reporter: claudep | Owner: nobody
Type: | Status: closed
Cleanup/optimization | Version: master
Component: Testing framework | Resolution: fixed

Severity: Normal | Triage Stage: Ready for
Keywords: | checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Claude Paroz <claude@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"2c9a03d4874d8938f18e99772a3d0962f9b16681"]:
{{{
#!CommitTicketReference repository=""
revision="2c9a03d4874d8938f18e99772a3d0962f9b16681"
Fixed #23707 -- Prevented discovery of duplicated tests
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23707#comment:8>

Reply all
Reply to author
Forward
0 new messages