Opened 11 years ago
Closed 11 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 , 11 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:2 by , 11 years ago
| Triage Stage: | Accepted → Unreviewed |
|---|
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:5 by , 11 years ago
@carljm: Already tried your solution, but we currently need those "inner" paths for application discovery (to set INSTALLED_APPS).
comment:6 by , 11 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 , 11 years ago
| Triage Stage: | Accepted → Ready for checkin |
|---|
comment:8 by , 11 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
That explains why Jenkins reports 2 failures for each GIS test sometimes.