Opened 10 years ago

Closed 10 years ago

#23707 closed Cleanup/optimization (fixed)

GIS tests may be run multiple times

Reported by: Claude Paroz Owned by: nobody
Component: Testing framework Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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.

Change History (8)

comment:1 by Tim Graham, 10 years ago

Triage Stage: UnreviewedAccepted

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

comment:2 by Carl Meyer, 10 years ago

Triage Stage: AcceptedUnreviewed

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.

comment:3 by Carl Meyer, 10 years ago

Triage Stage: UnreviewedAccepted

Oops.

comment:5 by Claude Paroz, 10 years ago

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

comment:6 by Carl Meyer, 10 years ago

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.

comment:7 by Tim Graham, 10 years ago

Triage Stage: AcceptedReady for checkin

comment:8 by Claude Paroz <claude@…>, 10 years ago

Resolution: fixed
Status: newclosed

In 2c9a03d4874d8938f18e99772a3d0962f9b16681:

Fixed #23707 -- Prevented discovery of duplicated tests

Note: See TracTickets for help on using tickets.
Back to Top